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

SgStrategy Class Reference

Strategy for achieving a certain goal. More...

#include <SgStrategy.h>

Inheritance diagram for SgStrategy:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

Strategy for achieving a certain goal.

Pure virtual class, see e.g. SgMiaiStrategy for an implementation.

Definition at line 36 of file SgStrategy.h.


Constructor & Destructor Documentation

SgStrategy::SgStrategy ( SgBlackWhite  player  ) 

Definition at line 30 of file SgStrategy.cpp.

virtual SgStrategy::~SgStrategy (  )  [virtual]

Definition at line 41 of file SgStrategy.h.


Member Function Documentation

void SgStrategy::Clear (  )  [virtual]

remove all data, reset to empty strategy.

Reimplemented in SgMiaiStrategy.

Definition at line 47 of file SgStrategy.cpp.

References SgHash< N >::Clear(), and m_code.

virtual SgPointSet SgStrategy::Dependency (  )  const [pure virtual]

all points on board that can possibly affect strategy

Implemented in SgMiaiStrategy.

virtual void SgStrategy::ExecuteMove ( SgMove  p,
SgBlackWhite  player 
) [pure virtual]

update strategy with move

SgBlackWhite SgStrategy::Player (  )  const

See m_player.

Definition at line 44 of file SgStrategy.h.

References m_player.

Referenced by SgMiaiMap::ConvertFromSgMiaiStrategy(), and SgMiaiStrategy::ExecuteMove().

virtual SgStrategyStatus SgStrategy::Status (  )  const [pure virtual]

check success of strategy on given board

Implemented in SgMiaiStrategy.

Referenced by Write().

virtual void SgStrategy::UndoMove (  )  [pure virtual]

go back to strategy state before move

Implemented in SgMiaiStrategy.

void SgStrategy::Write ( std::ostream &  stream  )  const [virtual]

Write object to stream.

Do not call directly, use operator<<

Reimplemented in SgMiaiStrategy.

Definition at line 40 of file SgStrategy.cpp.

References m_player, SgBW(), and Status().

Referenced by operator<<().


Member Data Documentation

Hash code of board region for which strategy is defined.

Definition at line 72 of file SgStrategy.h.

Referenced by Clear().

The player that this strategy is for.

Definition at line 69 of file SgStrategy.h.

Referenced by Player(), and Write().


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


Sun Mar 13 2011 Doxygen 1.7.1