Antichess.fromSetup constructor
Sets up a playable Antichess position.
Throws a PositionSetupException if the Setup does not meet basic validity
requirements.
Optionnaly pass ignoreImpossibleCheck if you want to skip that
requirement.
Implementation
factory Antichess.fromSetup(Setup setup, {bool? ignoreImpossibleCheck}) {
final pos = Antichess(
board: setup.board,
pockets: setup.pockets,
turn: setup.turn,
castles: Castles.empty,
epSquare: _validEpSquare(setup),
halfmoves: setup.halfmoves,
fullmoves: setup.fullmoves,
);
pos.validate(ignoreImpossibleCheck: ignoreImpossibleCheck);
return pos;
}