This commit is contained in:
2025-01-28 16:12:33 -05:00
parent 6ed4208534
commit 78ce4d4973
4 changed files with 3 additions and 245 deletions

View File

@@ -68,7 +68,7 @@ impl Board {
}
pub fn what_if(&self, i: usize, j: usize, piece: Piece) -> Option<(Self, usize)> {
let mut self_copy = self.clone();
let mut self_copy = *self;
if self_copy.get(i, j).is_some() {
return None;
}
@@ -85,7 +85,7 @@ impl Board {
return Ok(());
}
}
Err(format!("move would not propegate"))
Err("move would not propegate".to_string())
}
/// Propegate piece captures originating from (i, j)