No description
Find a file
Eryn Wells 1d7dada987 [bitboard, core, position] Implement proper castle move generation
Add a field to MoveSet called special that flags special moves that should be
generated in the iter() method. This field is a u8. It only tracks castles in
the first and second bits (kingside and queenside, respectively). The move iterator
chains two maps over Option<()> that produce the kingside and queenside castle
moves.

With that done, finish the implementation of Position::player_can_castle by
adding checks for whether the squares between the rook and king are clear, and
that the king would not pass through a check. This is done with BitBoards!

Finally, implement some logic in PositionBuilder that updates the position's
castling flags based on the positions of king and rooks.

Supporting changes:
- Add Color:ALL and iterate on that slice
- Add Castle::ALL and iterator on that slice
- Add a CastlingParameters struct that contains BitBoard properties that describe
  squares that should be clear of pieces and squares that should not be attacked.
2024-01-29 14:46:41 -08:00
bitboard [bitboard] Implement BitBoard::is_single_square() 2024-01-29 14:46:16 -08:00
core [bitboard, core, position] Implement proper castle move generation 2024-01-29 14:46:41 -08:00
doc Move Notes and ChessPieces docs to a doc directory 2024-01-22 19:27:08 -08:00
explorer Update the Cargo.toml files 2024-01-28 09:58:50 -08:00
position [bitboard, core, position] Implement proper castle move generation 2024-01-29 14:46:41 -08:00
.gitignore Ignore the target/ directory 2023-12-19 11:13:41 -08:00
Cargo.lock Merge branch 'many-crates' 2024-01-24 09:23:35 -08:00
Cargo.toml Update the Cargo.toml files 2024-01-28 09:58:50 -08:00