This commit is contained in:
Simon Gardling 2025-02-18 20:21:03 -05:00
parent 176505b897
commit be790c2d9e
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -236,10 +236,10 @@ impl Board {
self.place_unchecked(i, j, piece);
let captured = self.propegate_from(i, j);
if captured > 0 {
return Ok(());
Ok(())
} else {
self.delete(i, j);
return Err("move would not propegate");
Err("move would not propegate")
}
}
@ -253,7 +253,7 @@ impl Board {
let iterator = unsafe {
// SAFETY! `propegate_from_dry` should not have overlapping chains
// if overlapping chains were to exist, `self.place_unchecked` could collide with `self.get`
(&*(self as *const Self)).propegate_from_dry(i, j, starting_color)
(*(self as *const Self)).propegate_from_dry(i, j, starting_color)
};
let mut count = 0;
for &(i, j) in iterator {