Class GameManager
GameManager controls initialization, main game loop, oversees conditions for rendering
game. Creates and manages game universe.
Attributes
Environment*
Initializes the environment. For every update of the game, it sends message to
environment to update game universe and draw elements.
PlayerList
Keeps track of current players data. Uses players data to determine winner.
Add/Delete players to environment.
TimeLimit
When game type is Time Limit, this specifies end time of the game
CaptureLimit
When game type is Capture Limit, this specifies the max # of flags captured by
a player to win the game.
PreviousUpdateTime
Elapsedtime. Time that was pulled during last update.
Methods
GameManager()
Initialize()
Create the Environment, setup the network.
AddPlayer()
Add player to game
RemovePlayer()
Remove play from game
Start()
Initialize a new game and begins it
Update()
Checks for the end game state. Sends message to Environment to Update and Draw