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

Restart functionality in Main class and Enum for snake directions #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Abductcows
Copy link

The game can restart by clicking the yes option at the popup dialogue box. If no is selected, the game exits normally without System.exit(). Game threads terminate using a boolean variable and JFrames are disposed at termination and between restarts.

I understand that the replacement of int directions with the Enum could be done as a different pull request but I thought it would be simple enough to do it here. I will separate them if necessary.

George Bouroutzoglou added 3 commits January 23, 2021 20:55
and minor changes to accommodate that in Window and ThreadsController.

Ensured proper termination of the ThreadsController thread and timely disposing of previous JFrames
Quality of life improvement to avoid players having to center manually after restarts
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

Successfully merging this pull request may close these issues.

None yet

1 participant