Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

HexPlayer Class Reference

Abstract base class for all players. More...

#include <HexPlayer.hpp>

Inheritance diagram for HexPlayer:
BenzenePlayer HandicapPlayer MoHexPlayer PerfectPlayer WolvePlayer

List of all members.

Public Member Functions

virtual ~HexPlayer ()
virtual std::string Name () const =0
 Returns a unique identifier for this player.
virtual HexPoint GenMove (const HexState &state, const Game &game, HexBoard &brd, double maxTime, double &score)=0
 Generates a move from this game position.

Detailed Description

Abstract base class for all players.

Players are responsible for generating moves from a given boardstate.

Definition at line 22 of file HexPlayer.hpp.

Constructor & Destructor Documentation

virtual HexPlayer::~HexPlayer (  )  [inline, virtual]


Definition at line 27 of file HexPlayer.hpp.

Member Function Documentation

virtual HexPoint HexPlayer::GenMove ( const HexState state,
const Game game,
HexBoard brd,
double  maxTime,
double &  score 
) [pure virtual]

Generates a move from this game position.

If maxTime is negative, then there is no timelimit. Otherwise, maxTime is the number of seconds the player has to generate this move. If game is already over, player should return RESIGN. The player can store a score for the move it generated in score.

state Position and color to play.
game Game history up to this position.
brd HexBoard to do work on.
maxTime Time in which to return the move.
score Return score of move here.

Implemented in BenzenePlayer.

virtual std::string HexPlayer::Name (  )  const [pure virtual]

Returns a unique identifier for this player.

Implemented in MoHexPlayer, HandicapPlayer, PerfectPlayer, and WolvePlayer.

The documentation for this class was generated from the following file:

6 Jan 2011 Doxygen 1.6.3