txlyre 22 hours ago
parent
commit
f573c50034
1 changed files with 2 additions and 2 deletions
  1. 2 2
      chess0.py

+ 2 - 2
chess0.py

@@ -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")