Open-Source-Project-Collaboration / board-game-playing-ai

Chess AI using Neural Network and Min/Max algorithm and tree pruning
6 stars 3 forks source link

get_pawn_moves issue #9

Closed hyunshim closed 4 years ago

hyunshim commented 4 years ago

Issue where game crashes when pawn gets to 2nd last tile on either side sometimes.

Error Message: IndexError: list index out of range Error line: if (r == 6 or r == 1) and self.board[next_two_rows][c] == '--': # Two empty squares in front of pawn