#include <CMatch.h>
Public Member Functions | |
CMatch () | |
Constructor. Initialize some members. | |
virtual | ~CMatch () |
Destructor. Does nothing. | |
void | SetDisplay (CDisplay *pDisplay) |
Set link to the display object to use. | |
void | SetOptions (COptions *pOptions) |
Set link to the options object to use. | |
void | SetScores (CScores *pScores) |
Set link to the scores object to use. | |
void | SetTimer (CTimer *pTimer) |
Set link to the timer object to use. | |
void | SetSound (CSound *pSound) |
Set link to the sound object to use. | |
void | Create (void) |
Initialize the object. | |
void | Destroy (void) |
Uninitialize the object. | |
void | OpenInput (void) |
Get access to the input this object needs. | |
void | CloseInput (void) |
Release access to the input this object needs. | |
int | GetWinnerPlayer (void) |
Get the number of the player who won this match. | |
EGameMode | Update (void) |
Update the object and return what game mode should be set. | |
void | Display (void) |
Display on the screen. | |
void | _Debug_WriteBombsToLog () |
Only used for debugging! | |
Private Member Functions | |
void | CreateMainComponents (void) |
void | DestroyHurryUpMessage (void) |
void | DestroyPauseMessage (void) |
void | DestroyMainComponents (void) |
void | PlaySong (void) |
Start playing the match song if it hasn't started. | |
void | StopSong (void) |
void | ProcessPlayerCommands (void) |
Receive player commands. | |
void | UpdateMatch (void) |
void | ManagePauseMessage (void) |
void | ManageHurryUpMessage (void) |
Manage the hurry up message. | |
void | ManageMatchOver (void) |
void | DisplayMatchScreen (void) |
void | DisplayHurryUpMessage (void) |
void | DisplayPauseMessage (void) |
Private Attributes | |
CBoard | m_Board |
Board object. | |
CClock | m_Clock |
Clock object. | |
CArena | m_Arena |
Arena object. | |
CAiManager | m_AiManager |
bool | m_NoComputer |
bool | m_MatchOver |
Is match over? (ie. there is a result : winner or draw game). | |
int | m_WinnerPlayer |
Number of the player who won if there is a winner. | |
ESong | m_CurrentSong |
Current song being played. | |
bool | m_IsSongPlaying |
Is the match song playing? | |
bool | m_NoticedTimeUp |
Did we notice that time is up and do what is necessary? | |
CPauseMessage * | m_pPauseMessage |
Pause message object, instanciated when the match is paused. | |
CHurryMessage * | m_pHurryMessage |
Hurry up message object, instanciated when the arena starts to close. | |
float | m_ModeTime |
Time (in seconds) that elapsed since the mode has started. | |
float | m_ExitModeTime |
Mode time when we have to start the last black screen. | |
int | m_ExitGameMode |
Game mode to ask for when exiting. | |
bool | m_HaveToExit |
Do we have to exit this mode? | |
bool | computerPlayersPresent |
True, when there are AI players. |
CMatch::CMatch | ( | void | ) |
Constructor. Initialize some members.
CMatch::~CMatch | ( | void | ) | [virtual] |
Destructor. Does nothing.
void CMatch::CreateMainComponents | ( | void | ) | [private] |
void CMatch::DestroyHurryUpMessage | ( | void | ) | [private] |
void CMatch::DestroyPauseMessage | ( | void | ) | [private] |
void CMatch::DestroyMainComponents | ( | void | ) | [private] |
void CMatch::PlaySong | ( | void | ) | [private] |
Start playing the match song if it hasn't started.
void CMatch::StopSong | ( | void | ) | [private] |
void CMatch::ProcessPlayerCommands | ( | void | ) | [private] |
Receive player commands.
void CMatch::UpdateMatch | ( | void | ) | [private] |
void CMatch::ManagePauseMessage | ( | void | ) | [private] |
void CMatch::ManageHurryUpMessage | ( | void | ) | [private] |
Manage the hurry up message.
void CMatch::ManageMatchOver | ( | void | ) | [private] |
void CMatch::DisplayMatchScreen | ( | void | ) | [private] |
void CMatch::DisplayHurryUpMessage | ( | void | ) | [private] |
void CMatch::DisplayPauseMessage | ( | void | ) | [private] |
void CMatch::SetDisplay | ( | CDisplay * | pDisplay | ) | [inline, virtual] |
Set link to the display object to use.
Reimplemented from CModeScreen.
void CMatch::SetOptions | ( | COptions * | pOptions | ) | [inline, virtual] |
Set link to the options object to use.
Reimplemented from CModeScreen.
void CMatch::SetScores | ( | CScores * | pScores | ) | [inline] |
Set link to the scores object to use.
void CMatch::SetTimer | ( | CTimer * | pTimer | ) | [inline, virtual] |
Set link to the timer object to use.
Reimplemented from CModeScreen.
void CMatch::SetSound | ( | CSound * | pSound | ) | [inline, virtual] |
Set link to the sound object to use.
Reimplemented from CModeScreen.
void CMatch::Create | ( | void | ) | [virtual] |
void CMatch::Destroy | ( | void | ) | [virtual] |
void CMatch::OpenInput | ( | void | ) | [virtual] |
Get access to the input this object needs.
Open the player inputs for each human playing player. The player inputs have to be opened before reading them.
Implements CModeScreen.
void CMatch::CloseInput | ( | void | ) | [virtual] |
Release access to the input this object needs.
Close the player inputs for each human playing player. The player inputs should be closed when they are not needed anymore.
Implements CModeScreen.
int CMatch::GetWinnerPlayer | ( | void | ) | [inline] |
Get the number of the player who won this match.
EGameMode CMatch::Update | ( | void | ) | [virtual] |
Update the object and return what game mode should be set.
<
Implements CModeScreen.
void CMatch::Display | ( | void | ) | [virtual] |
void CMatch::_Debug_WriteBombsToLog | ( | ) |
Only used for debugging!
CBoard CMatch::m_Board [private] |
Board object.
CClock CMatch::m_Clock [private] |
Clock object.
CArena CMatch::m_Arena [private] |
Arena object.
CAiManager CMatch::m_AiManager [private] |
Computer brain
bool CMatch::m_NoComputer [private] |
bool CMatch::m_MatchOver [private] |
Is match over? (ie. there is a result : winner or draw game).
int CMatch::m_WinnerPlayer [private] |
Number of the player who won if there is a winner.
ESong CMatch::m_CurrentSong [private] |
Current song being played.
bool CMatch::m_IsSongPlaying [private] |
Is the match song playing?
bool CMatch::m_NoticedTimeUp [private] |
Did we notice that time is up and do what is necessary?
CPauseMessage* CMatch::m_pPauseMessage [private] |
Pause message object, instanciated when the match is paused.
CHurryMessage* CMatch::m_pHurryMessage [private] |
Hurry up message object, instanciated when the arena starts to close.
float CMatch::m_ModeTime [private] |
Time (in seconds) that elapsed since the mode has started.
float CMatch::m_ExitModeTime [private] |
Mode time when we have to start the last black screen.
int CMatch::m_ExitGameMode [private] |
Game mode to ask for when exiting.
bool CMatch::m_HaveToExit [private] |
Do we have to exit this mode?
bool CMatch::computerPlayersPresent [private] |
True, when there are AI players.