No description
Reorganize castling rights API on Board into methods named according to conventions applied to other API. Board::has_castling_right Board::has_castling_right_active Board::has_castling_right_unwrapped These all check if a color has the right to castle on a particular side (wing) of the board. The first takes an Option<Color>, the latter two operate on bare Colors: the active color, or an explicit Color. Board::grant_castling_right Board::grant_castling_right_active Board::grant_castling_right_unwrapped Grant castling rights to a color. Color arguments follow the pattern above. Board::revoke_castling_right Board::revoke_castling_right_active Board::revoke_castling_right_unwrapped Revoke castling rights from a color. Color arguments follow the pattern above. The latter two groups of methods take a new CastleRightsOption type that specifies either a single Wing or All. Rework the implementation of CastleRights to take a CastleRightsOption. Update the unit tests and make sure everything builds. |
||
---|---|---|
bitboard | ||
board | ||
chessfriend | ||
core | ||
doc | ||
explorer | ||
moves | ||
perft | ||
position | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
ChessFriend.code-workspace | ||
Makefile | ||
rustfmt.toml |