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

CStrategoGM Class Reference

CStrategoGM. More...

#include <StrategoGM.h>

Inheritance diagram for CStrategoGM:

CGameModule CPlayer CGenericTask List of all members.

Public Member Functions

 CStrategoGM ()
 CStrategoGM.
 ~CStrategoGM ()
 ~CStrategoGM
virtual CEID GetCEID () const
 GetCEID.
virtual void RemovePlayer (CDescription desc)
 RemovePlayer.
virtual uint32 GetMaxNumberPlayers () const
 SetPlayerDescription.
virtual uint32 GetMinNumberPlayers () const
 SetPlayerDescription.

Protected Member Functions

virtual void PlayMove (const CMove *m)
 PlayMove.
virtual bool CheckMove (const CMove *m)
 CheckMove.
bool Defeats (STRATEGOPIECE p1, STRATEGOPIECE p2) const
 Defeats.
virtual bool CheckForWin ()
 CheckForWin.
virtual void UpdateCurrentPlayerPiece ()
 UpdateCurrentPlayerPiece.
virtual void AddPlayer (CDescription desc)
 AddPlayer.
void SetPlayerDescription ()
 SetPlayerDescription.
virtual void NewGame ()
 NewGame.
virtual void InvalidMoveProcessing (const CMove *p)
 AddPlayer.
virtual void OnGameSpecificMessage (const CGameMessage *pMsg)
 OnGameSpecificMessage.
virtual CMoveRelayMove (CEID playerID, CMove *pMove)
 RelayMove.
virtual void TimeElapsed (const CPlayerPiece *p)
 TimeElapsed.

Detailed Description

CStrategoGM.

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

Limitations: NONE


Constructor & Destructor Documentation

CStrategoGM::CStrategoGM  ) 
 

CStrategoGM.

Description: Class constructor

Returns:
void
Limitations: NONE

CStrategoGM::~CStrategoGM  ) 
 

~CStrategoGM

Description: Class deconstructor

Returns:
void
Limitations: NONE


Member Function Documentation

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

AddPlayer.

Description:

Returns:
Limitations: NONE

Implements CGameModule.

bool CStrategoGM::CheckForWin  )  [protected, virtual]
 

CheckForWin.

Description: This function is called to check for win states.

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

Implements CGameModule.

bool CStrategoGM::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.

bool CStrategoGM::Defeats STRATEGOPIECE  p1,
STRATEGOPIECE  p2
const [protected]
 

Defeats.

Description: returns true if piece p1 defeats piece p2 in an attack

Returns:
bool
Limitations: NONE

CEID CStrategoGM::GetCEID  )  const [virtual]
 

GetCEID.

Description: Returns the CEID of this game module

Returns:
The CEID of this game module
Limitations: NONE

Implements CGameModule.

uint32 CStrategoGM::GetMaxNumberPlayers  )  const [virtual]
 

SetPlayerDescription.

Description:

Returns:
Limitations: NONE

Implements CGameModule.

uint32 CStrategoGM::GetMinNumberPlayers  )  const [virtual]
 

SetPlayerDescription.

Description:

Returns:
Limitations: NONE

Implements CGameModule.

void CStrategoGM::InvalidMoveProcessing const CMove pMove  )  [protected, virtual]
 

AddPlayer.

Description:

Returns:
Limitations: NONE

Implements CGameModule.

void CStrategoGM::NewGame  )  [protected, virtual]
 

NewGame.

Description: Builds a new game board

Returns:
Limitations: Should only be called once both players send there initial board setups

Implements CGameModule.

void CStrategoGM::OnGameSpecificMessage const CGameMessage pMsg  )  [protected, virtual]
 

OnGameSpecificMessage.

Description: Used to process other game specific game messages

Parameters:
pMsg pointer to a game message object
Returns:
void
Limitations: NONE

Reimplemented from CGameModule.

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

PlayMove.

Description: Plays a move.

Parameters:
pMove,: the move to play.
Returns:
void
Limitations: pMove must point to a valid move.

Implements CGameModule.

CMove * CStrategoGM::RelayMove CEID  playerID,
CMove pMove
[protected, virtual]
 

RelayMove.

Description: Used to determine which parts of a move a given player is allowed to see

Parameters:
 
Returns:
void
Limitations: NONE

Reimplemented from CGameModule.

void CStrategoGM::RemovePlayer CDescription  desc  )  [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 CStrategoGM::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 CStrategoGM::TimeElapsed const CPlayerPiece p  )  [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 CStrategoGM::UpdateCurrentPlayerPiece  )  [protected, virtual]
 

UpdateCurrentPlayerPiece.

Description:

Returns:
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