CGameManager
Up

Purpose:
The manager of game objects. Implements the main loop of the game.
Methods:
void BeginGame () - Initialize members, and starts the main loop in a worker thread.
void EndGame () - Stops the main loop and end game.
void AddObject (CGameObject *pGameObj) - Add a new game object.
void RemoveObject (CGameObject *pGameObj) - Remove an existing game object.
CGameObjectsList & ExposeObjects() - Expose the list of all game objects.
void GetBonusState(CMessage::MessageData& MsgData) - Return the state of the single game bonus.
BOOL GetTankStatus(int iTankID, CMessage::MessageData& MsgData) - Return the status of the given tank ID.
BOOL GetTankStatusAndPos(int iTankID, CMessage::MessageData& MsgData) - Return the status and position of the given tank ID.
DWORD GetMinesInSector (UINT uSector, DWORD *pAllMinesInSector) - Return the checksum of the mine in the given sector on the game board.
void SetMinesInSector (UINT uSector, DWORD dwNumMines, DWORD *pAllMinesInSector) - Update the mines objects in the sector.
BOOL IsRectVacant (CRect&) - Check that the rectangle is vacant.
BOOL IsPositionValid (CGameObject*) - Check that the object's position is vacant.
UINT GetFrequency () - Get the frequency specifies frames per second
BOOL SetFrequency (UINT) - Set the frequency specifies frames per second
void RefreshDisplay () - Ask the game manager to refresh entire map display on next frame
void FindVacantRect (CSize&, CPoint &) - Finds a vacant rectangle in the game board.
DWORD GetMinDistanceFromTanks (CPoint &) - Returns min distance from all active tanks.
BOOL IsAlive (UINT uTankID) - Returns TRUE if TankID appears in array.
int GetLocalTankID() const - Return the ID of the local tank (-1 if none).
 

Home Up Next