Gaming-in-Python icon indicating copy to clipboard operation
Gaming-in-Python copied to clipboard

End of game is not handled

Open StevenInfinity opened this issue 3 years ago • 0 comments

After 1 player wins the loop is still running and finally ends in error. The following errors was obtained

Traceback (most recent call last): File "C:/Users/chainreaction.py", line 243, in gameLoop() File "C:/Users/chainreaction.py", line 220, in gameLoop addAtom(i, j, players[currentPlayer]) File "C:/Users/chainreaction.py", line 137, in addAtom overFlow(grid[i][j], color) File "C:/Users/chainreaction.py", line 147, in overFlow overFlow(cell.neighbors[m], color) File "C:/Users/chainreaction.py", line 147, in overFlow overFlow(cell.neighbors[m], color) File "C:/Users/chainreaction.py", line 147, in overFlow overFlow(cell.neighbors[m], color) [Previous line repeated 1018 more times] File "C:/Users/chainreaction.py", line 141, in overFlow showPresentGrid() File "C:/Users/chainreaction.py", line 104, in showPresentGrid for i in range(cols): RecursionError: maximum recursion depth exceeded in comparison

StevenInfinity avatar Mar 29 '22 11:03 StevenInfinity