Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

MiniGameManager Class Reference

Handles minigame sessions. More...

#include <minigamemanager.h>

List of all members.

Public Member Functions

psMiniGameBoardDefFindGameDef (csString gameName)
 Find & return game board definition.
psMiniGameSessionGetSessionByID (uint32_t id)
 returns session by its id.
void Idle ()
 Idle function to check for idle players and players too far away.
bool Initialise ()
 Initialise Mini Game manager.
 MiniGameManager ()
void ResetAllGameSessions (void)
 reset all sessions, prob due to reloading action locations
 ~MiniGameManager ()

Protected Member Functions

void HandleGameUpdate (MsgEntry *me, Client *client)
 handles a client that has made a move.
void HandleStartGameRequest (Client *client)
 client requests start of game session.
void HandleStartStop (MsgEntry *me, Client *client)
 Handle start and stop messages.
void HandleStopGameRequest (Client *client)
 client handles stopping of game session.
int16_t ParseGameboardOptions (psString optionsStr)
 function parses game options string from gameboards DB table.
void RemovePlayerFromSessions (psMiniGameSession *session, Client *client, uint32_t clientID)
 a client is removed from a game session.
void ResetGameSession (psMiniGameSession *sessionToReset)
 requests a session to be reset.

Protected Attributes

csHash< psMiniGameBoardDef
*, csString > 
gameBoardDef
 Minigame board definitions by name.
csHash< psMiniGameSession
*, uint32_t > 
playerSessions
 Maps players to game sessions for quicker access.
csPDelArray< psMiniGameSessionsessions
 Game sessions.

Detailed Description

Handles minigame sessions.

This is the manager class of mini-games, handling overall mini-game definitions, action-location gameboards and game sessions.

Definition at line 293 of file minigamemanager.h.


Constructor & Destructor Documentation

MiniGameManager::MiniGameManager ( )
MiniGameManager::~MiniGameManager ( )

Member Function Documentation

psMiniGameBoardDef* MiniGameManager::FindGameDef ( csString  gameName)

Find & return game board definition.

psMiniGameSession* MiniGameManager::GetSessionByID ( uint32_t  id)

returns session by its id.

void MiniGameManager::HandleGameUpdate ( MsgEntry me,
Client client 
) [protected]

handles a client that has made a move.

void MiniGameManager::HandleStartGameRequest ( Client client) [protected]

client requests start of game session.

void MiniGameManager::HandleStartStop ( MsgEntry me,
Client client 
) [protected]

Handle start and stop messages.

void MiniGameManager::HandleStopGameRequest ( Client client) [protected]

client handles stopping of game session.

void MiniGameManager::Idle ( )

Idle function to check for idle players and players too far away.

bool MiniGameManager::Initialise ( )

Initialise Mini Game manager.

int16_t MiniGameManager::ParseGameboardOptions ( psString  optionsStr) [protected]

function parses game options string from gameboards DB table.

void MiniGameManager::RemovePlayerFromSessions ( psMiniGameSession session,
Client client,
uint32_t  clientID 
) [protected]

a client is removed from a game session.

void MiniGameManager::ResetAllGameSessions ( void  )

reset all sessions, prob due to reloading action locations

void MiniGameManager::ResetGameSession ( psMiniGameSession sessionToReset) [protected]

requests a session to be reset.


Member Data Documentation

csHash<psMiniGameBoardDef*, csString> MiniGameManager::gameBoardDef [protected]

Minigame board definitions by name.

Definition at line 346 of file minigamemanager.h.

csHash<psMiniGameSession*, uint32_t> MiniGameManager::playerSessions [protected]

Maps players to game sessions for quicker access.

Definition at line 343 of file minigamemanager.h.

csPDelArray<psMiniGameSession> MiniGameManager::sessions [protected]

Game sessions.

Definition at line 340 of file minigamemanager.h.


The documentation for this class was generated from the following file: