Pockets class
Pockets (captured pieces) in chess variants like Crazyhouse.
- Annotations
-
- @immutable
Properties
Methods
-
count(
Role role) → int - Counts the number of pieces by Role.
-
decrement(
Side side, Role role) → Pockets - Decrements the number of pieces in the pocket of that Side and Role.
-
hasPawn(
Side side) → bool - Checks whether this side has at least 1 pawn.
-
hasQuality(
Side side) → bool - Checks whether this side has at least 1 quality (any piece but a pawn).
-
increment(
Side side, Role role) → Pockets - Increments the number of pieces in the pocket of that Side and Role.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
Side side, Role role) → int - Gets the number of pieces of that Side and Role in the pocket.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override