Implement a way to determine if a game has been victorious. There are various game modes and therefore the method should be able to be used no matter what game mode is being played.
This method is going to be used by the server to verify that games are completed, and, once games are completed, the server will provide players with EXP and other in-game resources. However, don't worry about the server implementation for now.
Solution
Create a method, potentially on the GameState, to determine if the game is over. Return a GameEndEvent (I might not have the name right, but close to that. This is a model in the Models project).
Enhancement Description
Implement a way to determine if a game has been victorious. There are various game modes and therefore the method should be able to be used no matter what game mode is being played.
This method is going to be used by the server to verify that games are completed, and, once games are completed, the server will provide players with EXP and other in-game resources. However, don't worry about the server implementation for now.
Solution
Create a method, potentially on the
GameState
, to determine if the game is over. Return aGameEndEvent
(I might not have the name right, but close to that. This is a model in the Models project).