This commit is contained in:
2025-01-28 16:44:28 -05:00
parent 0dac4a9a38
commit 37c3f8572f
2 changed files with 16 additions and 14 deletions

View File

@@ -63,10 +63,6 @@ impl Board {
*self.get_mut(i, j) = Some(piece);
}
pub fn move_would_propegate(&self, i: usize, j: usize, piece: Piece) -> i16 {
self.what_if(i, j, piece).map(|x| x.1 as i16).unwrap_or(-1)
}
pub fn what_if(&self, i: usize, j: usize, piece: Piece) -> Option<(Self, usize)> {
let mut self_copy = *self;
if self_copy.get(i, j).is_some() {