Skip to content

Commit 8e87148

Browse files
committed
Modify move legality checking
Fixes #48
1 parent 7ca88af commit 8e87148

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python_easy_chess_gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363

6464
APP_NAME = 'Python Easy Chess GUI'
65-
APP_VERSION = 'v1.14'
65+
APP_VERSION = 'v1.15'
6666
BOX_TITLE = '{} {}'.format(APP_NAME, APP_VERSION)
6767

6868

@@ -2049,7 +2049,7 @@ def play_game(self, window, engine_id_name, board):
20492049
user_move = chess.Move(fr_sq, to_sq)
20502050

20512051
# Check if user move is legal
2052-
if user_move in board.legal_moves:
2052+
if user_move in list(board.legal_moves):
20532053
# Update rook location if this is a castle move
20542054
if board.is_castling(user_move):
20552055
self.update_rook(window, str(user_move))

0 commit comments

Comments
 (0)