Skip to content
alutz23 edited this page Nov 20, 2013 · 3 revisions

Game Over State

This state shows the stats accrued throughout the game. It shows the total number of hits, total damage taken, total amount a player has moved and who has won the game.

Select Important Fields:

  • statList1 stat list for player 1
  • statList2 stat list for player 2
  • displayWinnerMessage string variable that has player name + " wins!"
  • statTitles string array for titles of each important statistical category
  • nameOfPlayer1 string to show Player 1 is the "Blue" tank
  • nameOfPlayer2 string to show Player 2 is the "Red" tank

Enter()

Enter handles getting the stats. It shows who has won the game based upon which player has received less damage. If no player has been hit, or both players receive same damage, the result is a tie.

LoadImages()

This handles loading the images for the buttons "Exit Game" and "Play Again" as well as the background for "Game Over."

Render()

Render handles displaying the images as well as the information saved into the statsList arrays.

Screenshot of the Game Over

Clone this wiki locally