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

COthelloAI Class Reference

COthelloAI. More...

#include <OthelloAI.h>

Inheritance diagram for COthelloAI:

CAIModule CLocalPlayer CPlayer CGenericTask List of all members.

Public Member Functions

 COthelloAI ()
 COthelloAI.
 ~COthelloAI ()
 ~COthelloAI

Protected Member Functions

void NewGame ()
 NewGame.
void Play (const CPiece *)
 Play.
void PlayMove (const CMove *m)
 PlayMove.
bool CheckMove (const CMove *m)
 CheckMove.
void InvalidMoveProcessing (const CMove *p)
 InvalidMoveProcessing.
void SetPlayerDescription ()
 SetPlayerDescription.
void SetPlayerPiece (const CPiece *p)
 SetPlayerPiece.
void UndoLastMove ()
 UndoLastMove.
vector< COthelloMoveGenerateMoves ()
 GenerateMoves.
void ShowBoard () const
 ShowBoard.
void OnGameOver ()
 OnGameOver.
COthelloMove ABDLM (int32 a, int32 b, int8 d)
 ABDLM.
int32 ABMax (int32 a, int32 b, int8 d)
 ABMax.
int32 ABMin (int32 a, int32 b, int8 d)
 ABMin.
int32 Evaluate ()
 Evaluate.

Detailed Description

COthelloAI.

Description: AI player for Othello

Limitations: NONE


Constructor & Destructor Documentation

COthelloAI::COthelloAI  ) 
 

COthelloAI.

Description: Creates a new instance of COthelloAI

Parameters:
NONE 
Returns:
void
Limitations: NONE

COthelloAI::~COthelloAI  ) 
 

~COthelloAI

Description: Destructor

Parameters:
NONE 
Returns:
void
Limitations: NONE


Member Function Documentation

COthelloMove COthelloAI::ABDLM int32  a,
int32  b,
int8  d
[protected]
 

ABDLM.

Description: Preforms an Alpha Beta MiniMax search on the current position

Parameters:
NONE 
Returns:
MOVE
Limitations: NONE

int32 COthelloAI::ABMax int32  a,
int32  b,
int8  d
[protected]
 

ABMax.

Description:

Parameters:
NONE 
Returns:
void
Limitations: NONE

int32 COthelloAI::ABMin int32  a,
int32  b,
int8  d
[protected]
 

ABMin.

Description:

Parameters:
NONE 
Returns:
void
Limitations: NONE

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

CheckMove.

Description: Returns true if the MOVE pMove is valid

Parameters:
pMove the move to be played
Returns:
bool
Limitations: NONE

Implements CAIModule.

int32 COthelloAI::Evaluate  )  [protected]
 

Evaluate.

Description:

Parameters:
 
Returns:
Limitations:

std::vector< COthelloMove > COthelloAI::GenerateMoves  )  [protected]
 

GenerateMoves.

Description: Returns a character representing the piece.

Parameters:
p the piece to get the character for
Returns:
The character representing the piece
Limitations: NONE

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

InvalidMoveProcessing.

Description: Called when an invalid move was discovered.

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

Implements CAIModule.

void COthelloAI::NewGame  )  [protected, virtual]
 

NewGame.

Description: Initalizes the game board

Returns:
void
Limitations: NONE

Implements CAIModule.

void COthelloAI::OnGameOver  )  [protected]
 

OnGameOver.

Description: Called when the game is over. Prints a message to the screen indicating who the winner is.

Returns:
void
Limitations: NONE

void COthelloAI::Play const CPiece  )  [protected, virtual]
 

Play.

Description: Generates the move to play

Parameters:
NONE 
Returns:
MOVE to be played
Limitations: NONE

Implements CAIModule.

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

PlayMove.

Description: Applies the move pMove

Parameters:
 
Returns:
void
Limitations: pMove must be a valid move.

Implements CAIModule.

void COthelloAI::SetPlayerDescription  )  [protected, virtual]
 

SetPlayerDescription.

Description: Sets the m_PlayerInfo variable with the correct data.

Returns:
void
Limitations: NONE

Reimplemented from CAIModule.

void COthelloAI::SetPlayerPiece const CPiece p  )  [protected, 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

Implements CAIModule.

void COthelloAI::ShowBoard  )  const [protected]
 

ShowBoard.

Description: Displays the Othello board

Parameters:
NONE 
Returns:
void
Limitations: NONE

void COthelloAI::UndoLastMove  )  [protected]
 

UndoLastMove.

Description: Undoes the last move played

Parameters:
NONE 
Returns:
void
Limitations: At least one previous move must have been played


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