|
@@ -22,9 +22,9 @@ class ChessSession:
|
|
|
self.move_ts = time.time()
|
|
|
|
|
|
def check_game_over(self):
|
|
|
- if self.board.is_game_over():
|
|
|
- outcome = self.board.outcome()
|
|
|
+ outcome = self.board.outcome(claim_draw=True)
|
|
|
|
|
|
+ if outcome is not None:
|
|
|
raise GameOver(f"{outcome.result()} {outcome.termination.name}")
|
|
|
elif self.board.status() & chess.STATUS_NO_WHITE_KING:
|
|
|
raise GameOver(f"0-1 CHECKMATE")
|