Define some constants in Square that refer to the starting positions of the two kings, and the target castling squares. Then implement the following methods that use those constants to determine if a move is a castle. - Move::is_kingside_castle() - Move::is_queenside_castle() - Move::is_castle() These checks only apply to King moves, and if the king is moving from and to specific squares. |
||
---|---|---|
.. | ||
src | ||
Cargo.lock | ||
Cargo.toml |