Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CTicTacToeGM Class Reference

CTicTacToeGM. More...

#include <TicTacToeGM.h>

Inheritance diagram for CTicTacToeGM:

CGameModule CPlayer CGenericTask List of all members.

Public Member Functions

 CTicTacToeGM ()
 CTicTacToeGM.
 ~CTicTacToeGM ()
 ~CTicTacToeGM
CEID GetCEID () const
 GetCEID.
uint32 GetMaxNumberPlayers () const
 GetMaxNumberPlayers.
uint32 GetMinNumberPlayers () const
 GetMixNumberPlayers.
uint32 GetNumberPlayers () const
 GetNumberPlayers.

Protected Member Functions

void NewGame ()
 NewGame.
void PlayMove (const CMove *m)
 PlayMove.
bool CheckMove (const CMove *m)
 CheckMove.
bool CheckForWin ()
 CheckForWin.
void InvalidMoveProcessing (const CMove *m)
 InvalidMoveProcessing.
void UpdateCurrentPlayerPiece ()
 UpdateCurrentPlayerPiece.
void SetPlayerDescription ()
 SetPlayerDescription.
void AddPlayer (CDescription desc)
 AddPlayer.
void RemovePlayer (CDescription desc)
 RemovePlayer.
void TimeElapsed (const CPlayerPiece *piece)
 TimeElapsed.
bool CheckForPieceWin (CTicTacToePiece p) const
 CheckForPieceWin.

Detailed Description

CTicTacToeGM.

Description: Game module for Tic-Tac-Toe

Limitations: NONE


Constructor & Destructor Documentation

CTicTacToeGM::CTicTacToeGM  ) 
 

CTicTacToeGM.

Description: Class constructor

Limitations: NONE

CTicTacToeGM::~CTicTacToeGM  ) 
 

~CTicTacToeGM

Description: Class deconstructor

Limitations: NONE


Member Function Documentation

void CTicTacToeGM::AddPlayer CDescription  desc  )  [protected, virtual]
 

AddPlayer.

Description: This function is called to add a player to the game.

Parameters:
desc is the description of the player to add.
Returns:
void
Limitations: NONE

Implements CGameModule.

bool CTicTacToeGM::CheckForPieceWin CTicTacToePiece  p  )  const [protected]
 

CheckForPieceWin.

Description: Checks to see if a certain piece is a winner.

Parameters:
p is the piece to check to see if it is the winner.
Returns:
void
Limitations: NONE

bool CTicTacToeGM::CheckForWin  )  [protected, virtual]
 

CheckForWin.

Description: Checks for a winner of the game.

Returns:
Returns true if there is a winner and false otherwise.
Limitations: NONE

Implements CGameModule.

bool CTicTacToeGM::CheckMove const CMove m  )  [protected, virtual]
 

CheckMove.

Description: Checks a move for validity and returns true if the move is valid.

Parameters:
m is the move to check.
Returns:
True if the move is valid and false otherwise.
Limitations: NONE

Implements CGameModule.

CEID CTicTacToeGM::GetCEID  )  const [inline, virtual]
 

GetCEID.

Description: Returns the CEID of this game module.

Returns:
The CEID of this game module.
Limitations: NONE

Implements CGameModule.

uint32 CTicTacToeGM::GetMaxNumberPlayers  )  const [inline, virtual]
 

GetMaxNumberPlayers.

Description: Returns the minimum number of players required to play this game.

Returns:
The minimum number of players required to play this game.
Limitations: NONE

Implements CGameModule.

uint32 CTicTacToeGM::GetMinNumberPlayers  )  const [inline, virtual]
 

GetMixNumberPlayers.

Description: Returns the minimum number of players required to play this game.

Returns:
The minimum number of players required in order to play this game.
Limitations: NONE

Implements CGameModule.

uint32 CTicTacToeGM::GetNumberPlayers  )  const [inline, virtual]
 

GetNumberPlayers.

Description: Returns the current number of players

Returns:
The current number of players.
Limitations: NONE

Implements CGameModule.

void CTicTacToeGM::InvalidMoveProcessing const CMove m  )  [protected, virtual]
 

InvalidMoveProcessing.

Description: Called when an invalid move has been determined. It declares the other person to be the winner.

Parameters:
m is the invalid move.
Returns:
void
Limitations: NONE

Implements CGameModule.

void CTicTacToeGM::NewGame  )  [protected, virtual]
 

NewGame.

Description: Resets the board and sets the first player to move.

Returns:
void
Limitations:

Implements CGameModule.

void CTicTacToeGM::PlayMove const CMove m  )  [protected, virtual]
 

PlayMove.

Description: Plays a move.

Parameters:
m is the move to play.
Returns:
void
Limitations: NONE

Implements CGameModule.

void CTicTacToeGM::RemovePlayer CDescription  desc  )  [protected, virtual]
 

RemovePlayer.

Description: Removes a player from the game. This function will only be called when a game is not being played.

Parameters:
desc is the description of the player who is leaving the game.
Returns:
void
Limitations: NONE

Implements CGameModule.

void CTicTacToeGM::SetPlayerDescription  )  [protected, virtual]
 

SetPlayerDescription.

Description: Sets the description of this game module.

Returns:
void
Limitations: NONE

Reimplemented from CGameModule.

void CTicTacToeGM::TimeElapsed const CPlayerPiece piece  )  [protected, virtual]
 

TimeElapsed.

Description: Called when the time of one of the players has expired.

Parameters:
piece is the CTicTacToePiece and CEID of the player whose time has elapsed.
Returns:
void
Limitations: NONE

Implements CGameModule.

void CTicTacToeGM::UpdateCurrentPlayerPiece  )  [protected, virtual]
 

UpdateCurrentPlayerPiece.

Description: Updates the current player piece to the next person who is to move.

Returns:
void
Limitations: NONE

Implements CGameModule.


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo