#include <SgStrategy.h>
Inheritance diagram for SgStrategy:
Pure virtual class, see e.g. SgMiaiStrategy for an implementation.
Definition at line 38 of file SgStrategy.h.
Public Member Functions | |
SgStrategy (SgBlackWhite player) | |
virtual | ~SgStrategy () |
SgBlackWhite | Player () const |
See m_player. | |
virtual void | Clear () |
remove all data, reset to empty strategy. | |
virtual SgPointSet | Dependency () const =0 |
all points on board that can possibly affect strategy | |
virtual SgStrategyStatus | Status () const =0 |
check success of strategy on given board | |
virtual void | ExecuteMove (SgMove p, SgBlackWhite player)=0 |
update strategy with move | |
virtual void | UndoMove ()=0 |
go back to strategy state before move | |
virtual void | Write (std::ostream &stream) const |
Write object to stream. | |
Private Attributes | |
SgBlackWhite | m_player |
The player that this strategy is for. | |
SgHashCode | m_code |
Hash code of board region for which strategy is defined. |
SgStrategy::SgStrategy | ( | SgBlackWhite | player | ) |
Definition at line 31 of file SgStrategy.cpp.
virtual SgStrategy::~SgStrategy | ( | ) | [virtual] |
Definition at line 43 of file SgStrategy.h.
void SgStrategy::Clear | ( | ) | [virtual] |
remove all data, reset to empty strategy.
Reimplemented in SgMiaiStrategy.
Definition at line 48 of file SgStrategy.cpp.
References SgHash< N >::Clear(), and m_code.
Referenced by SgMiaiStrategy::Clear().
virtual SgPointSet SgStrategy::Dependency | ( | ) | const [pure virtual] |
virtual void SgStrategy::ExecuteMove | ( | SgMove | p, | |
SgBlackWhite | player | |||
) | [pure virtual] |
SgBlackWhite SgStrategy::Player | ( | ) | const |
See m_player.
Definition at line 46 of file SgStrategy.h.
References m_player.
Referenced by SgMiaiMap::ConvertFromSgMiaiStrategy(), and SgMiaiStrategy::ExecuteMove().
virtual SgStrategyStatus SgStrategy::Status | ( | ) | const [pure virtual] |
virtual void SgStrategy::UndoMove | ( | ) | [pure virtual] |
void SgStrategy::Write | ( | std::ostream & | stream | ) | const [virtual] |
Write object to stream.
Do not call directly, use operator<<
Reimplemented in SgMiaiStrategy.
Definition at line 41 of file SgStrategy.cpp.
References m_player, SgBW(), and Status().
Referenced by operator<<(), and SgMiaiStrategy::Write().
SgHashCode SgStrategy::m_code [private] |
Hash code of board region for which strategy is defined.
Definition at line 74 of file SgStrategy.h.
Referenced by Clear().
SgBlackWhite SgStrategy::m_player [private] |