RectRegion class
A region on a board used to define area-specific piece behaviour.
- Inheritance
-
- Object
- Region
- BoardRegion
- RectRegion
Constructors
- RectRegion({int? startRank, int? endRank, int? startFile, int? endFile})
-
const
- RectRegion.file(int file)
-
A board region consisting of the entirety of a single file.
factory
-
RectRegion.fromJson(Map<
String, dynamic> json) -
factory
- RectRegion.lrbt(int? l, int? r, int? b, int? t)
-
factory
- RectRegion.rank(int rank)
-
A board region consisting of the entirety of a single rank.
factory
- RectRegion.square(int file, int rank)
-
A board region consisting of a single square.
factory
Properties
- endFile → int?
-
The file the region ends at, inclusive.
If null, the last file will be used.
final
- endRank → int?
-
The rank the region ends at, inclusive.
If null, the last rank will be used.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startFile → int?
-
The file the region starts at, inclusive.
If null, the first file will be used.
final
- startRank → int?
-
The rank the region starts at, inclusive.
If null, the first rank will be used.
final
Methods
-
build(
BoardSize size) → BuiltRegion -
inherited
-
contains(
int file, int rank) → bool -
override
-
finalise(
BoardSize size) → RectRegion -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
squares(
BoardSize size) → Set< int> -
override
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
override
-
translate(
int x, int y) → RectRegion -
override
Operators
-
operator &(
BoardRegion other) → IntersectRegion -
inherited
-
operator +(
BoardRegion other) → UnionRegion -
inherited
-
operator -(
BoardRegion other) → SubtractRegion -
inherited
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator ^(
BoardRegion other) → XorRegion -
inherited