txlyre 2 tháng trước cách đây
mục cha
commit
36c0792fbb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      chess0.py

+ 1 - 1
chess0.py

@@ -30,7 +30,7 @@ class ChessSession:
                 move = self.board.parse_san(move[1:])
             else:
                 move = self.board.parse_uci(move)
-        except chess.InvalidMoveError:
+        except (chess.InvalidMoveError, chess.IllegalMoveError):
             raise IllegalMove(move)
 
         if move != chess.Move.null() and move not in self.board.legal_moves: