[board] Implement a bunch of sight tests

This commit is contained in:
Eryn Wells 2024-01-17 08:44:27 -08:00
parent 2174bcf009
commit 3ba6722697
2 changed files with 111 additions and 0 deletions

View file

@ -236,6 +236,12 @@ impl Position {
.next()
.unwrap();
sight_of_opposing_player.is_set(king_square)
}
#[cfg(test)]
impl Position {
pub(crate) fn test_set_en_passant_square(&mut self, square: Square) {
self.en_passant_square = Some(square);
}
}