MaterialConditions<T> class
Specifies the minimum sets of pieces required for the game not to be a draw.
T
should be String
for definitions, and is converted to int
when the Variant
is built.
- Available Extensions
Constructors
-
MaterialConditions({required bool enabled, List<
T> soloMaters = const [], List<T> pairMaters = const [], List<T> combinedPairMaters = const [], List<List< specialCases = const []})T> > -
const
-
MaterialConditions.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
combinedPairMaters
→ List<
T> -
Pieces that can mate if there are two of them. The pieces can belong to different players.
e.g. Bishops in standard chess.
Note: this doesn't consider the fact that two bishops of the same colour can't deliver mate.
final
- enabled → bool
-
If material conditions are not enabled, insufficient material draws will not be checked.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pairMaters
→ List<
T> -
Pieces that can mate if there are two of them. The pieces can belong to different players.
Note: this doesn't consider the fact that two bishops of the same colour can't deliver mate.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
soloMaters
→ List<
T> -
Pieces that can deliver checkmate on their own (or with a king).
e.g. Queens and Rooks in standard chess.
final
-
specialCases
→ List<
List< T> > -
Specific sets of pieces that can deliver mate.
e.g. a Knight and a Bishop in standard chess.
final
Methods
-
copyWith(
{bool? enabled, List< T> ? soloMaters, List<T> ? pairMaters, List<T> ? combinedPairMaters, List<List< ? specialCases}) → MaterialConditions<T> >T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
none
→ const MaterialConditions<
String> - Disable insufficient material draws.
-
standard
→ const MaterialConditions<
String> - Material conditions for standard chess, as well as simple expanded variants with chancellor and archbishop only (e.g. Capablanca).