Abstract base class for all players. More...
#include <HexPlayer.hpp>
Public Member Functions | |
virtual | ~HexPlayer () |
Destructor. | |
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. |
Abstract base class for all players.
Players are responsible for generating moves from a given boardstate.
Definition at line 22 of file HexPlayer.hpp.
virtual HexPlayer::~HexPlayer | ( | ) | [inline, virtual] |
Destructor.
Definition at line 27 of file HexPlayer.hpp.
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.