Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals   Related Pages  

CGameEngine Class Reference

Game engine includes all higher level logic for the game. More...

#include <engine.h>


Public Member Functions

 CGameEngine (istream *aWeapons, istream *aMap, istream *aTeamInfo=NULL)
 Constructor to load bots from stream.

void setGraphicsEngine (CGraphicsEngine *aGraphicsEngine)
 Setter for graphics engine.

bool loop ()
 Game loop.

char ** getResults (bool aTeamResults)
 Getter for results.

void restart (istream *aMap=NULL)
 Resets scores and initializes new game.

void setFragLimit (int aFragLimit)
 Setter for frag limit.


Detailed Description

Game engine includes all higher level logic for the game.

Allocates required number of bots, stores team information and game options.


Constructor & Destructor Documentation

CGameEngine::CGameEngine istream *    aWeapons,
istream *    aMap,
istream *    aTeamInfo = NULL
 

Constructor to load bots from stream.

Data is read from streams in given order.

Parameters:
aWeapons Stream to read available weapon types.
aMap Stream to read tilemap.
aTeamInfo Stream to load teams and bots, or NULL to load all available bots (ffa).


Member Function Documentation

char** CGameEngine::getResults bool    aTeamResults
 

Getter for results.

Results are sorted by scores. First 5 characters of each line are reserved for scores.

Parameters:
aTeamResults True to get team results, false to get results for every bot.
Returns:
Sorted table of strings including scores and names.

bool CGameEngine::loop  
 

Game loop.

Returns:
False if game has ended.

void CGameEngine::restart istream *    aMap = NULL
 

Resets scores and initializes new game.

Parameters:
aMap Stream to load new tilemap, NULL to restart with old map.

void CGameEngine::setGraphicsEngine CGraphicsEngine *    aGraphicsEngine
 

Setter for graphics engine.

Parameters:
aGraphicsEngine Graphics engine used to draw game. NULL to disables drawing.


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 22:02:25 2003 for Drunken Bot III by doxygen1.3-rc3