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
Game Restart Implementation #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to be working and the code is clean!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, overall. Haven't tested locally yet, merging this on priority.
Just the one complaint-- the Restart button is made available to all, but is only enabled for the Server/Client instance, i.e. the Restart button is effectively just a dummy button for the connected Client instances. This isn't appropriate for the common setup in multiplayer which would include a headless server instance running permanently to which multiple clients connect and play. In such a setup, one client/group should have special permission to change game settings, trigger game restarts, etc.
As discussed, take this up in a future PR.
Also, might be nice to refactor ScoreUpdateFromServerEvent
to take both team scores in a single event instead of the two that are needed currently.
Project Cards:
How to test:
Expected outcome:
The game over screen should now show a list of all players. Pressing restart will get players back to their bases and reset the points and health. Remote clients shouldn't be able to restart the game. Only Server/Client instance should be able to restart the game.