Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

SpSimplePlayer Class Reference

SimplePlayer has one move generator. More...

#include <SpSimplePlayer.h>

Inheritance diagram for SpSimplePlayer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~SpSimplePlayer ()
SgPoint GenMove (const SgTimeRecord &time, SgBlackWhite toPlay)
virtual int MoveValue (SgPoint p)
GoBoardBoard ()
const GoBoardBoard () const
virtual std::string Name () const
SgNodeCurrentNode () const
void ClearSearchTraces ()
SgNodeTransferSearchTraces ()
virtual void OnGameFinished ()
virtual void OnNewGame ()
virtual void Ponder ()
int Variant () const
void SetVariant (int variant)
void SetSubscriber (GoBoard &subscriber)
void UpdateSubscriber ()

Protected Member Functions

 SpSimplePlayer (const GoBoard &board, SpMoveGenerator *generator)
virtual void OnBoardChange ()
virtual void PrePlay (GoPlayerMove move)
virtual void OnPlay (GoPlayerMove move)
virtual void PreUndo ()
virtual void OnUndo ()

Protected Attributes

SgNodem_currentNode

Private Member Functions

virtual bool UseFilter () const
 Don't play on safe points.

Private Attributes

SpMoveGeneratorm_generator
 Move generator.
SpRandomMoveGeneratorm_randomGenerator
 Use random generator if no other move found.

Detailed Description

SimplePlayer has one move generator.

It generates random moves if no other move is found.

Definition at line 20 of file SpSimplePlayer.h.


Constructor & Destructor Documentation

SpSimplePlayer::~SpSimplePlayer (  )  [virtual]

Definition at line 33 of file SpSimplePlayer.cpp.

References m_generator, m_randomGenerator, and SG_ASSERT.

SpSimplePlayer::SpSimplePlayer ( const GoBoard board,
SpMoveGenerator generator 
) [protected]

Definition at line 25 of file SpSimplePlayer.cpp.


Member Function Documentation

SgPoint SpSimplePlayer::GenMove ( const SgTimeRecord time,
SgBlackWhite  toPlay 
) [virtual]
int SpSimplePlayer::MoveValue ( SgPoint  p  )  [virtual]
virtual bool SpSimplePlayer::UseFilter (  )  const [private, virtual]

Don't play on safe points.

Reimplemented in SpAveragePlayer, SpMinLibPlayer, and SpRandomPlayer.

Definition at line 41 of file SpSimplePlayer.h.

Referenced by GenMove(), and MoveValue().


Member Data Documentation

Move generator.

Definition at line 35 of file SpSimplePlayer.h.

Referenced by GenMove(), MoveValue(), and ~SpSimplePlayer().

Use random generator if no other move found.

Definition at line 38 of file SpSimplePlayer.h.

Referenced by GenMove(), and ~SpSimplePlayer().


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


Sun Mar 13 2011 Doxygen 1.7.1