[board] Update Position::player_has_right_to_castle callsites
This commit is contained in:
parent
094131822c
commit
d2ee9244c2
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ move_generator_declaration!(KingMoveGenerator, getters);
|
|||
impl<'a> KingMoveGenerator<'a> {
|
||||
#[allow(unused_variables)]
|
||||
fn king_side_castle(position: &Position, color: Color) -> Option<Move> {
|
||||
if !position.is_castling_allowed(color, BoardSide::King) {
|
||||
if !position.player_has_right_to_castle(color, BoardSide::King) {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ impl<'a> KingMoveGenerator<'a> {
|
|||
|
||||
#[allow(unused_variables)]
|
||||
fn queen_side_castle(position: &Position, color: Color) -> Option<Move> {
|
||||
if !position.is_castling_allowed(color, BoardSide::Queen) {
|
||||
if !position.player_has_right_to_castle(color, BoardSide::Queen) {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue