[board] Add a few comments in position::position
One TODO And one doc comment.
This commit is contained in:
parent
704ee2f425
commit
84c9c43a7d
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue