Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoBoard::State Struct Reference

List of all members.

Detailed Description

Data that can be restored quickly with TakeSnapshot/RestoreSnapshot.

Corresponds to the current state, excluding block data (which is stored in the stack m_blockList), data, which is only defined immediately after a function call, ot data, which is not expected to change during a TakeSnapshot/RestoreSnapshot (e.g. rules)

Definition at line 742 of file GoBoard.h.

Public Attributes

SgPoint m_koPoint
 Point which is currently illegal for simple Ko rule.
SgBlackWhite m_toPlay
 Whose turn it is to play.
HashCode m_hash
 Hash code for this board position.
SgBWSet m_all
SgPointSet m_empty
SgArray< Block *, SG_MAXPOINTm_block
SgBWArray< int > m_prisoners
 Number of prisoners of each color.
SgBWArray< int > m_numStones
 Number of stones currently on the board.
int m_koLevel
 Number of 'illegal' ko recaptures by m_koColor.
SgArray< int, SG_MAXPOINTm_color
 The current board position.
SgArray< int, SG_MAXPOINTm_nuNeighborsEmpty
 Number of black and white neighbors.
SgBWArray< SgArray< int, SG_MAXPOINT > > m_nuNeighbors
 Number of black and white neighbors.
SgArray< bool, SG_MAXPOINTm_isFirst
 Flag if point has not been modified yet.
bool m_isNewPosition
 Flag if position is definitely new (no possibility of repetition), set to true when move is played at any point for the first time, and set to false at the next capture.


Member Data Documentation

SgBWSet GoBoard::State::m_all

Definition at line 753 of file GoBoard.h.

Referenced by GoBoard::AddStone(), GoBoard::All(), GoBoard::CheckConsistency(), GoBoard::Init(), GoBoard::Occupied(), and GoBoard::RemoveStone().

SgArray<Block*,SG_MAXPOINT> GoBoard::State::m_block

Definition at line 757 of file GoBoard.h.

Referenced by GoBoard::AddStoneToBlock(), GoBoard::Anchor(), GoBoard::CheckConsistency(), GoBoard::CheckConsistencyBlock(), GoBoard::CheckSuicide(), GoBoard::CreateSingleStoneBlock(), GoBoard::GetAdjacentBlocks(), GoBoard::InitBlock(), GoBoard::IsAdjacentTo(), GoBoard::IsInBlock(), GoBoard::IsLibertyOfBlock(), GoBoard::KillBlock(), GoBoard::MergeBlocks(), GoBoard::NumLiberties(), GoBoard::NumStones(), GoBoard::Occupied(), GoBoard::OccupiedInAtari(), GoBoard::RestoreKill(), GoBoard::RestoreSnapshot(), GoBoard::TakeSnapshot(), GoBoard::TheLiberty(), and GoBoard::UpdateBlocksAfterUndo().

SgArray<int,SG_MAXPOINT> GoBoard::State::m_color

The current board position.

Definition at line 769 of file GoBoard.h.

Referenced by GoBoard::AddStone(), GoBoard::CheckConsistency(), GoBoard::GetColor(), GoBoard::GetStone(), GoBoard::Init(), GoBoard::InitBlock(), GoBoard::IsColor(), GoBoard::IsEmpty(), and GoBoard::RemoveStone().

SgPointSet GoBoard::State::m_empty

Definition at line 755 of file GoBoard.h.

Referenced by GoBoard::AddStone(), GoBoard::AllEmpty(), GoBoard::Init(), and GoBoard::RemoveStone().

HashCode GoBoard::State::m_hash

Hash code for this board position.

Definition at line 751 of file GoBoard.h.

Referenced by GoBoard::AddStoneForUndo(), GoBoard::CheckKo(), GoBoard::GetHashCode(), GoBoard::GetHashCodeInclToPlay(), GoBoard::Init(), GoBoard::Play(), GoBoard::RemoveStoneForUndo(), GoBoard::RestoreState(), and GoBoard::SaveState().

SgArray<bool,SG_MAXPOINT> GoBoard::State::m_isFirst

Flag if point has not been modified yet.

Definition at line 778 of file GoBoard.h.

Referenced by GoBoard::AddStoneForUndo(), GoBoard::Init(), GoBoard::IsFirst(), GoBoard::RestoreState(), and GoBoard::SaveState().

bool GoBoard::State::m_isNewPosition

Flag if position is definitely new (no possibility of repetition), set to true when move is played at any point for the first time, and set to false at the next capture.

Definition at line 783 of file GoBoard.h.

Referenced by GoBoard::AddStoneForUndo(), GoBoard::Init(), GoBoard::IsNewPosition(), GoBoard::Play(), GoBoard::RestoreState(), and GoBoard::SaveState().

int GoBoard::State::m_koLevel

Number of 'illegal' ko recaptures by m_koColor.

Definition at line 766 of file GoBoard.h.

Referenced by GoBoard::CheckKo(), GoBoard::Init(), GoBoard::KoLevel(), GoBoard::RestoreState(), and GoBoard::SaveState().

SgPoint GoBoard::State::m_koPoint

Point which is currently illegal for simple Ko rule.

Definition at line 745 of file GoBoard.h.

Referenced by GoBoard::Init(), GoBoard::IsLegal(), GoBoard::KillBlock(), GoBoard::KoPoint(), GoBoard::Play(), GoBoard::RestoreState(), and GoBoard::SaveState().

SgBWArray<int> GoBoard::State::m_numStones

Number of stones currently on the board.

Definition at line 763 of file GoBoard.h.

Referenced by GoBoard::Init(), GoBoard::KillBlock(), GoBoard::Play(), GoBoard::RestoreKill(), GoBoard::TotalNumEmpty(), GoBoard::TotalNumStones(), and GoBoard::UpdateBlocksAfterUndo().

SgBWArray<SgArray<int,SG_MAXPOINT> > GoBoard::State::m_nuNeighbors

Number of black and white neighbors.

Definition at line 775 of file GoBoard.h.

Referenced by GoBoard::AddStone(), GoBoard::HasNeighbors(), GoBoard::Init(), GoBoard::IsLibertyOfBlock(), GoBoard::NumNeighbors(), and GoBoard::RemoveStone().

SgArray<int,SG_MAXPOINT> GoBoard::State::m_nuNeighborsEmpty

Number of black and white neighbors.

Definition at line 772 of file GoBoard.h.

Referenced by GoBoard::AddStone(), GoBoard::HasEmptyNeighbors(), GoBoard::Init(), GoBoard::NumEmptyNeighbors(), and GoBoard::RemoveStone().

SgBWArray<int> GoBoard::State::m_prisoners

Number of prisoners of each color.

Definition at line 760 of file GoBoard.h.

Referenced by GoBoard::Init(), GoBoard::KillBlock(), GoBoard::NumPrisoners(), and GoBoard::RestoreKill().

SgBlackWhite GoBoard::State::m_toPlay

Whose turn it is to play.

Definition at line 748 of file GoBoard.h.

Referenced by GoBoard::FullBoardRepetition(), GoBoard::IsLegal(), GoBoard::Opponent(), GoBoard::Play(), GoBoard::RestoreState(), GoBoard::SaveState(), GoBoard::SetToPlay(), and GoBoard::ToPlay().


The documentation for this struct was generated from the following file:


17 Jun 2010 Doxygen 1.4.7