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

GoBoardHistory Class Reference

Identifier for board state including history. More...

#include <GoBoardHistory.h>

List of all members.

Public Member Functions

 GoBoardHistory ()
 Constructor.
void SetFromBoard (const GoBoard &bd)
 Initialize from a current board position.
bool IsAlternatePlayFollowUpOf (const GoBoardHistory &other, std::vector< SgPoint > &sequence)
 Check if this position is a alternate-play follow-up to another one.

Private Attributes

int m_boardSize
GoRules m_rules
GoSetup m_setup
SgArrayList< GoPlayerMove,
GO_MAX_NUM_MOVES
m_moves
SgBlackWhite m_toPlay

Detailed Description

Identifier for board state including history.

This class can be used, for instance, to uniquely remember a board position for reusing parts of previous computations. The state includes:

Definition at line 21 of file GoBoardHistory.h.


Constructor & Destructor Documentation

GoBoardHistory::GoBoardHistory (  ) 

Constructor.

The initial state is that the history does not correspond to any valid position.

Definition at line 52 of file GoBoardHistory.h.


Member Function Documentation

bool GoBoardHistory::IsAlternatePlayFollowUpOf ( const GoBoardHistory other,
std::vector< SgPoint > &  sequence 
)

Check if this position is a alternate-play follow-up to another one.

Parameters:
other The other position
[out] sequence The sequence leading from the other position to this one
Returns:
true If the position is a follow-up

Definition at line 24 of file GoBoardHistory.cpp.

References GoPlayerMove::Color(), SgArrayList< T, SIZE >::Length(), m_boardSize, m_moves, m_rules, m_setup, m_toPlay, GoPlayerMove::Point(), and SgOppBW().

void GoBoardHistory::SetFromBoard ( const GoBoard bd  ) 

Member Data Documentation

Definition at line 41 of file GoBoardHistory.h.

Referenced by IsAlternatePlayFollowUpOf(), and SetFromBoard().

Definition at line 47 of file GoBoardHistory.h.

Referenced by IsAlternatePlayFollowUpOf(), and SetFromBoard().

Definition at line 43 of file GoBoardHistory.h.

Referenced by IsAlternatePlayFollowUpOf(), and SetFromBoard().

Definition at line 45 of file GoBoardHistory.h.

Referenced by IsAlternatePlayFollowUpOf(), and SetFromBoard().

Definition at line 49 of file GoBoardHistory.h.

Referenced by IsAlternatePlayFollowUpOf(), and SetFromBoard().


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


Sun Mar 13 2011 Doxygen 1.7.1