Resolve "Remove final hindrances to make multiplayer work"
Changes made in this merge request
-
Refactor:
GameStateTanktoStatsand add avoid update(Tank tank)method -
Refactor: logic for setting
GameStateinGameController, using the methodvoid initializeGameState()to initialize it in the first fetch call. Update theGameStateinvoid endPlayerTurn(). -
Fix: call
endPlayerTurnwhengameStatusis set totrue. Ensures that the opponent is informed about the fact that the game has ended. -
Fix: Introduce boolean
gameStartedto ensure that the first animation plays properly -
Fix: Make win and lose banners show in the end by refactoring
void checkGameOver()method -
Fix: Stop polling by checking the
gameStatusfield -
Fix: Change if-statement for tank movement to avoid getting stuck on edges
-
Fix: Give tank1's bullet id "bullet1" and tank2's id "bullet2", and update
CollisionDetectionto register hits on the opposite tank's bullet. -
Fix: Check gamestatus field in
void endPlayerTurn()onResultto stop receiving move data after game is done. Consequently, the win banner will not be overwritten by the "Your turn" banner.
Discovered problems during testing
-
Tank gets stuck on edges - m_bodycount < m_bodyCapacity -> Moved to different MR
-
Tank 1 takes no damage - Ensure that tank is not instantiated before terrain has been fetched -> Look at in different MR
-
Win banner does not show, sometimes?
(Extra) Manual retry during gameplay on lost connection
Closes #62 (closed)