Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End of game is not handled #8

Open
StevenInfinity opened this issue Mar 29, 2022 · 0 comments
Open

End of game is not handled #8

StevenInfinity opened this issue Mar 29, 2022 · 0 comments

Comments

@StevenInfinity
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant