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

GoBoard::Block Class Reference

Data related to a block of stones on the board. More...

List of all members.

Public Types

typedef SgArrayList< SgPoint,
MAX_LIBERTIES
LibertyList
typedef LibertyList::Iterator LibertyIterator
typedef GoPointList::Iterator StoneIterator

Public Member Functions

SgPoint Anchor () const
void UpdateAnchor (SgPoint p)
void AppendLiberty (SgPoint p)
void AppendStone (SgPoint p)
SgBlackWhite Color () const
void ExcludeLiberty (SgPoint p)
void Init (SgBlackWhite c, SgPoint anchor)
void Init (SgBlackWhite c, SgPoint anchor, GoPointList stones, LibertyList liberties)
const LibertyListLiberties () const
int NumLiberties () const
int NumStones () const
void PopStone ()
void SetAnchor (SgPoint p)
const GoPointListStones () const

Static Public Attributes

static const int MAX_LIBERTIES = (SG_MAX_SIZE / 3) * 2 * SG_MAX_SIZE
 Upper limit for liberties.

Private Attributes

SgPoint m_anchor
SgBlackWhite m_color
LibertyList m_liberties
GoPointList m_stones

Detailed Description

Data related to a block of stones on the board.

Definition at line 510 of file GoBoard.h.


Member Typedef Documentation

typedef LibertyList::Iterator GoBoard::Block::LibertyIterator

Definition at line 519 of file GoBoard.h.

Definition at line 517 of file GoBoard.h.

typedef GoPointList::Iterator GoBoard::Block::StoneIterator

Definition at line 521 of file GoBoard.h.


Member Function Documentation

SgPoint GoBoard::Block::Anchor (  )  const
void GoBoard::Block::AppendLiberty ( SgPoint  p  ) 
void GoBoard::Block::AppendStone ( SgPoint  p  ) 

Definition at line 529 of file GoBoard.h.

References m_stones, and SgArrayList< T, SIZE >::PushBack().

Referenced by GoBoard::AddStoneToBlock(), and GoBoard::MergeBlocks().

SgBlackWhite GoBoard::Block::Color (  )  const
void GoBoard::Block::ExcludeLiberty ( SgPoint  p  ) 
void GoBoard::Block::Init ( SgBlackWhite  c,
SgPoint  anchor,
GoPointList  stones,
LibertyList  liberties 
)
void GoBoard::Block::Init ( SgBlackWhite  c,
SgPoint  anchor 
)
const LibertyList& GoBoard::Block::Liberties (  )  const

Definition at line 555 of file GoBoard.h.

References m_liberties.

Referenced by GoBoard::CheckConsistencyBlock(), and GoBoard::MergeBlocks().

int GoBoard::Block::NumLiberties (  )  const

Definition at line 557 of file GoBoard.h.

References SgArrayList< T, SIZE >::Length(), and m_liberties.

Referenced by GoBoard::OccupiedInAtari(), and GoBoard::RemoveLibAndKill().

int GoBoard::Block::NumStones (  )  const

Definition at line 559 of file GoBoard.h.

References SgArrayList< T, SIZE >::Length(), and m_stones.

void GoBoard::Block::PopStone (  ) 

Definition at line 561 of file GoBoard.h.

References m_stones, and SgArrayList< T, SIZE >::PopBack().

Referenced by GoBoard::UpdateBlocksAfterUndo().

void GoBoard::Block::SetAnchor ( SgPoint  p  ) 

Definition at line 563 of file GoBoard.h.

References m_anchor.

Referenced by GoBoard::UpdateBlocksAfterUndo().

const GoPointList& GoBoard::Block::Stones (  )  const
void GoBoard::Block::UpdateAnchor ( SgPoint  p  ) 

Definition at line 525 of file GoBoard.h.

References m_anchor.

Referenced by GoBoard::AddStoneToBlock(), and GoBoard::MergeBlocks().


Member Data Documentation

Definition at line 568 of file GoBoard.h.

Referenced by Anchor(), Init(), SetAnchor(), and UpdateAnchor().

Definition at line 570 of file GoBoard.h.

Referenced by Color(), and Init().

Definition at line 572 of file GoBoard.h.

Referenced by AppendLiberty(), ExcludeLiberty(), Init(), Liberties(), and NumLiberties().

Definition at line 574 of file GoBoard.h.

Referenced by AppendStone(), Init(), NumStones(), PopStone(), and Stones().

const int GoBoard::Block::MAX_LIBERTIES = (SG_MAX_SIZE / 3) * 2 * SG_MAX_SIZE [static]

Upper limit for liberties.

Proof?

Definition at line 515 of file GoBoard.h.


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


Sun Mar 13 2011 Doxygen 1.7.1