[board, position] Add a color argument to opposing_sight

New convention: active_color_ methods operate on the active color of the Board.
Methods without that prefix take a color parameter and operate on that.

Refactor opposing_sight to do this.
This commit is contained in:
Eryn Wells 2025-05-23 09:56:47 -07:00
parent a92ec9aba3
commit 0abe9b6c19
3 changed files with 10 additions and 7 deletions

View file

@ -81,8 +81,8 @@ impl Position {
}
/// A [`BitBoard`] of all squares visible by colors that oppose the given color.
pub fn opposing_sight(&self) -> BitBoard {
self.board.opposing_sight()
pub fn active_color_opposing_sight(&self) -> BitBoard {
self.board.active_color_opposing_sight()
}
}