fn status done
This commit is contained in:
1 parent
d7b9e571f3
commit
b895eaa265
1 file changed
+12
-14
@@ -46,20 +46,18 @@ impl ChessEngine for Breakthrough {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn status(&self) -> GameStatus {
|
fn status(&self) -> GameStatus {
|
||||||
todo!();
|
if self.board.is_mask_zero(Color::White, 0) {
|
||||||
// if self.board.is_mask_zero(0, 0) {
|
return GameStatus::Won(Color::Black);
|
||||||
// return GameStatus::Won(Color::White);
|
}
|
||||||
// }
|
if self.board.is_mask_zero(Color::Black, 0) {
|
||||||
// if self.board.is_mask_zero(0, 1) {
|
return GameStatus::Won(Color::White);
|
||||||
// return GameStatus::Won(Color::Black);
|
}
|
||||||
// }
|
if !self.board.and_mask_is_zero(Color::Black, 0, BLACK_WON_ZONE) {
|
||||||
// if !self.board.and_mask_is_zero(0, 1, WHITE_WON_ZONE){
|
return GameStatus::Won(Color::Black);
|
||||||
// return GameStatus::Won(Color::White);
|
}
|
||||||
// }
|
if !self.board.and_mask_is_zero(Color::White, 0, WHITE_WON_ZONE) {
|
||||||
// if !self.board.and_mask_is_zero(0, 0, BLACK_WON_ZONE){
|
return GameStatus::Won(Color::White);
|
||||||
// return GameStatus::Won(Color::Black);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
GameStatus::Ongoing
|
GameStatus::Ongoing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user