Castles class
- Annotations
-
- @immutable
Constructors
- Castles({required SquareSet unmovedRooks, required Square? whiteRookQueenSide, required Square? whiteRookKingSide, required Square? blackRookQueenSide, required Square? blackRookKingSide, required SquareSet whitePathQueenSide, required SquareSet whitePathKingSide, required SquareSet blackPathQueenSide, required SquareSet blackPathKingSide})
-
const
- Castles.fromSetup(Setup setup)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
paths
→ BySide<
ByCastlingSide< SquareSet> > -
Gets rooks paths by side and castling side.
no setter
-
rooksPositions
→ BySide<
ByCastlingSide< Square?> > -
Gets rooks positions by side and castling side.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unmovedRooks → SquareSet
-
SquareSet of rooks that have not moved yet.
final
Methods
-
discardRookAt(
Square square) → Castles -
discardSide(
Side side) → Castles -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pathOf(
Side side, CastlingSide cs) → SquareSet - Gets the squares that need to be empty so that castling is possible on the given side.
-
rookOf(
Side side, CastlingSide cs) → Square? - Gets the rook Square by side and castling side.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override