[board] Add a few comments in position::position

One TODO
And one doc comment.
This commit is contained in:
Eryn Wells 2024-01-21 13:07:07 -08:00
parent 704ee2f425
commit 84c9c43a7d

View file

@ -89,9 +89,12 @@ impl Position {
return false;
}
// TODO: Perform a real check that the player can castle.
true
}
/// Return a PlacedPiece representing the rook to use for a castling move.
pub(crate) fn rook_for_castle(&self, player: Color, castle: Castle) -> Option<PlacedPiece> {
let square = match (player, castle) {
(Color::White, Castle::KingSide) => Square::H1,