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

COthelloGM Class Reference

COthelloGM. More...

#include <OthelloGM.h>

Inheritance diagram for COthelloGM:

CGameModule CPlayer CGenericTask List of all members.

Public Member Functions

 COthelloGM ()
 COthelloGM.
 ~COthelloGM ()
 ~COthelloGM
CEID GetCEID () const
 GetCEID.
uint32 GetMaxNumberPlayers () const
 VERSION CONTROL HISTORY
Revision
1.1
.

Protected Member Functions

void NewGame ()
 NewGame.
void PlayMove (const CMove *)
 PlayMove.
bool CheckMove (const CMove *)
 CheckMove.
bool CheckForWin ()
 CheckForWin.
void InvalidMoveProcessing (const CMove *)
 InvalidMoveProcessing.
void UpdateCurrentPlayerPiece ()
 UpdateCurrentPlayerPiece.
void SetPlayerDescription ()
 SetPlayerDescription.
void AddPlayer (CDescription)
 AddPlayer.
void RemovePlayer (CDescription desc)
 RemovePlayer.
void TimeElapsed (const CPlayerPiece *)
 TimeElapsed.
bool HasValidMoves (COthelloPiece player)
 HasValidMoves.
int8 CheckDirection (const COthelloMove *m, int8 direction) const
 CheckDirection.

Detailed Description

COthelloGM.

Description: The Othello Game Module. It will check that moves are valid.

Limitations: NONE


Constructor & Destructor Documentation

COthelloGM::COthelloGM  ) 
 

COthelloGM.

Description: Class constructor

Returns:
void
Limitations: NONE

COthelloGM::~COthelloGM  ) 
 

~COthelloGM

Description: Class deconstructor

Returns:
void
Limitations: NONE


Member Function Documentation

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

AddPlayer.

Description: Adds a player to the game.

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

Implements CGameModule.

int8 COthelloGM::CheckDirection const COthelloMove m,
int8  direction
const [protected]
 

CheckDirection.

Description:

Parameters:
 
Returns:
Limitations:

bool COthelloGM::CheckForWin  )  [protected, virtual]
 

CheckForWin.

Description: This function is called to check for win states. Also needs to update the m_playerList to indicate the correct win states for the players

Returns:
true if the game is won.
Limitations: NONE

Implements CGameModule.

bool COthelloGM::CheckMove const CMove pMove  )  [protected, virtual]
 

CheckMove.

Description: This function is called to verify a move is valid.

Parameters:
m is the move to check.
Returns:
true if move is valid.
Limitations: NONE

Implements CGameModule.

CEID COthelloGM::GetCEID  )  const [virtual]
 

GetCEID.

Description: Returns the CEID of this game module

Returns:
The CEID of this game module
Limitations: NONE

Implements CGameModule.

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

VERSION CONTROL HISTORY

Revision
1.1
.

Log
OthelloGM.hpp,v
Revision 1.1 2005/06/12 18:22:16 mabruns Initial Import

Revision 1.1 2005/04/14 04:38:29 mab6d5 Updated to use the new GM base class.

Revision 1.1 2005/03/20 23:48:50 tcsvw5 Moved inline functions to seperate file

Revision 1.0 2005/02/03 20:39:04 cafene Added CVS expansion keywords to the template.

Implements CGameModule.

bool COthelloGM::HasValidMoves COthelloPiece  player  )  [protected]
 

HasValidMoves.

Description: This function is called to check if a player has any valid moves.

Returns:
true if the player has at least one valid move.
Limitations: NONE

void COthelloGM::InvalidMoveProcessing const CMove  )  [protected, virtual]
 

InvalidMoveProcessing.

Description: Called when an invalid move was discovered. Set m_bGameOver to true and set the m_winningMsg & m_winningMsgLength values if you want the game to end.

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

Implements CGameModule.

void COthelloGM::NewGame  )  [protected, virtual]
 

NewGame.

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

Returns:
void
Limitations:

Implements CGameModule.

void COthelloGM::PlayMove const CMove pMove  )  [protected, virtual]
 

PlayMove.

Description: Plays a move.

Parameters:
m is the move to play.
Returns:
void
Limitations: m must be valid move.

Implements CGameModule.

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

RemovePlayer.

Description: Removes a player to the game. Set m_bReadyToStart to false if the game is no longer ready to start.

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

Implements CGameModule.

void COthelloGM::SetPlayerDescription  )  [protected, virtual]
 

SetPlayerDescription.

Description: Sets the m_PlayerInfo variable with the correct data. Override this function and set your information.

Returns:
void
Limitations: NONE

Reimplemented from CGameModule.

void COthelloGM::TimeElapsed const CPlayerPiece  )  [protected, virtual]
 

TimeElapsed.

Description: Called when either a player's move time or game time has expired

Parameters:
piece is the CPlayerPiece* of the player whose time has expired
Returns:
void
Limitations: NONE

Implements CGameModule.

void COthelloGM::UpdateCurrentPlayerPiece  )  [protected, virtual]
 

UpdateCurrentPlayerPiece.

Description: Updates the value of the m_curPiece variable to the piece that should play now.

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