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

CTicTacToeAI Class Reference

CTicTacToeAI. More...

#include <TicTacToeAI.h>

Inheritance diagram for CTicTacToeAI:

CAIModule CLocalPlayer CPlayer CGenericTask List of all members.

Public Member Functions

 CTicTacToeAI ()
 CTicTacToeAI.
 ~CTicTacToeAI ()
 ~CTicTacToeAI

Protected Member Functions

void NewGame ()
 NewGame.
void Play (const CPiece *p)
 Play.
void PlayMove (const CMove *m)
 PlayMove.
bool CheckMove (const CMove *m)
 CheckMove.
void SetPlayerPiece (const CPiece *p)
 SetPlayerPiece.
void InvalidMoveProcessing (const CMove *p)
 InvalidMoveProcessing.
void SetPlayerDescription ()
 SetPlayerDescription.
list< CTicTacToeMoveGenerateMoves ()
 GenerateMoves.

Detailed Description

CTicTacToeAI.

Description: Class represents an AI for TicTacToe

Limitations: NONE


Constructor & Destructor Documentation

CTicTacToeAI::CTicTacToeAI  ) 
 

CTicTacToeAI.

Description: Class constructor

Limitations: NONE

CTicTacToeAI::~CTicTacToeAI  ) 
 

~CTicTacToeAI

Description: Class deconstructor

Limitations: NONE


Member Function Documentation

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

CheckMove.

Description: Checks a move for validity. Returns true if the move is valid and false otherwise.

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

Implements CAIModule.

list< CTicTacToeMove > CTicTacToeAI::GenerateMoves  )  [protected]
 

GenerateMoves.

Description: Generates legal moves.

Returns:
The list of legal moves for this player.
Limitations: NONE

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

InvalidMoveProcessing.

Description: Called when an invalid move message is sent

Returns:
void
Limitations:

Implements CAIModule.

void CTicTacToeAI::NewGame  )  [protected, virtual]
 

NewGame.

Description: Resets the board to starting state.

Returns:
void
Limitations: NONE

Implements CAIModule.

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

Play.

Description: Finds a move to play. Just a random move selection.

Returns:
void
Limitations: NONE

Implements CAIModule.

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

PlayMove.

Description: Plays a move.

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

Implements CAIModule.

void CTicTacToeAI::SetPlayerDescription  )  [protected, virtual]
 

SetPlayerDescription.

Description: Sets the description of this AI Module.

Returns:
void
Limitations: NONE

Reimplemented from CAIModule.

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

SetPlayerPiece.

Description: Sets the piece of this player.

Parameters:
p is the piece to set.
Returns:
void
Limitations: NONE

Implements CAIModule.


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