fn status done

This commit is contained in:
vova-rs committed 2026-10-12 03:47:14 +03:00
1 parent d7b9e571f3
commit b895eaa265
1 file changed
+12 -14
+12 -14
View File
@@ -46,20 +46,18 @@ impl ChessEngine for Breakthrough {
}
fn status(&self) -> GameStatus {
todo!();
// if self.board.is_mask_zero(0, 0) {
// return GameStatus::Won(Color::White);
// }
// if self.board.is_mask_zero(0, 1) {
// return GameStatus::Won(Color::Black);
// }
// if !self.board.and_mask_is_zero(0, 1, WHITE_WON_ZONE){
// return GameStatus::Won(Color::White);
// }
// if !self.board.and_mask_is_zero(0, 0, BLACK_WON_ZONE){
// return GameStatus::Won(Color::Black);
// }
if self.board.is_mask_zero(Color::White, 0) {
return GameStatus::Won(Color::Black);
}
if self.board.is_mask_zero(Color::Black, 0) {
return GameStatus::Won(Color::White);
}
if !self.board.and_mask_is_zero(Color::Black, 0, BLACK_WON_ZONE) {
return GameStatus::Won(Color::Black);
}
if !self.board.and_mask_is_zero(Color::White, 0, WHITE_WON_ZONE) {
return GameStatus::Won(Color::White);
}
GameStatus::Ongoing
}