chessfriend/moves/src
Eryn Wells 4ce7e89cdb [board, explorer, moves] Clean up the castling rights API
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.
2025-06-18 23:44:40 +00:00
..
generators [explorer, moves, perft] A few rustfmt changes that reorder imports 2025-06-16 13:49:29 -07:00
algebraic.rs [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
defs.rs [moves] Implement promotions and en passant in the PawnMoveGenerator 2025-05-24 18:01:14 -07:00
generators.rs [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
lib.rs [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
macros.rs [board, moves, position] Make the Peter Ellis Jones gotcha unit tests work 2025-06-06 21:45:07 -07:00
make_move.rs [board, explorer, moves] Clean up the castling rights API 2025-06-18 23:44:40 +00:00
moves.rs [core, moves, position] Implement parsing long algebraic moves 2025-06-16 08:57:48 -07:00
record.rs [board, explorer, moves] Clean up the castling rights API 2025-06-18 23:44:40 +00:00
testing.rs [explorer, moves, position] Remove unused MoveBuilder 2025-06-08 17:16:23 -07:00
unmake_move.rs [board, explorer, moves] Clean up the castling rights API 2025-06-18 23:44:40 +00:00