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

CAIModule Class Reference

CAIModule. More...

#include <AIModule.h>

Inheritance diagram for CAIModule:

CLocalPlayer CPlayer CGenericTask CBackgammonAI COthelloAI CStrategoAI CTicTacToeAI List of all members.

Public Member Functions

 CAIModule ()
 CAIModule.
virtual ~CAIModule ()
 ~CAIModule

Protected Member Functions

virtual void NewGame ()=0
 NewGame.
virtual void Play (const CPiece *p)=0
 Play.
virtual void PlayMove (const CMove *m)=0
 PlayMove.
virtual bool CheckMove (const CMove *m)=0
 CheckMove.
virtual void SetPlayerPiece (const CPiece *p)=0
 SetPlayerPiece.
virtual void InvalidMoveProcessing (const CMove *p)=0
 InvalidMoveProcessing.
virtual void SetPlayerDescription ()
 SetPlayerDescription.

Detailed Description

CAIModule.

Description: Base class AI module to make writing AI modules easier.

Limitations: NONE


Constructor & Destructor Documentation

CAIModule::CAIModule  ) 
 

CAIModule.

Description: Class constructor

Limitations: NONE

CAIModule::~CAIModule  )  [virtual]
 

~CAIModule

Description: Class deconstructor

Limitations: NONE


Member Function Documentation

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

CheckMove.

Description: Checks a move and returns true if it is valid and false otherwise.

Parameters:
m is the move that should be checked for validity.
Returns:
True if the move is valid and false otherwise
Limitations: NONE

Implemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.

virtual void CAIModule::InvalidMoveProcessing const CMove p  )  [protected, pure virtual]
 

InvalidMoveProcessing.

Description: Called when an invalid move was discovered.

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

Implemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.

virtual void CAIModule::NewGame  )  [protected, pure virtual]
 

NewGame.

Description: Initalizes the game board

Returns:
void
Limitations: NONE

Implemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.

virtual void CAIModule::Play const CPiece p  )  [protected, pure virtual]
 

Play.

Description: Sets the m_curMove variable to the next move.

Parameters:
p is the piece to play. Used to pass on information that might be needed to play (eg. Dice rolls).
Returns:
void
Limitations: NONE

Implemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.

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

PlayMove.

Description: Plays a move by updating the game board.

Parameters:
m is the move that should be made.
Returns:
void
Limitations: The move m must be a valid move.

Implemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.

void CAIModule::SetPlayerDescription  )  [protected, virtual]
 

SetPlayerDescription.

Description: Sets the m_PlayerInfo variable with the correct data.

Returns:
void
Limitations: NONE

Reimplemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.

virtual void CAIModule::SetPlayerPiece const CPiece p  )  [protected, pure virtual]
 

SetPlayerPiece.

Description: This function is called when the player piece of this player is set by the Game Module.

Parameters:
p is this player's piece.
Returns:
void
Limitations: NONE

Implemented in CBackgammonAI, COthelloAI, CStrategoAI, and CTicTacToeAI.


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