Definition at line 559 of file GoBoard.h.
Public Types | |
typedef SgSList< 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 LibertyList & | Liberties () const |
int | NumLiberties () const |
int | NumStones () const |
void | PopStone () |
void | SetAnchor (SgPoint p) |
const GoPointList & | Stones () 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 |
SgPoint GoBoard::Block::Anchor | ( | ) | const |
Definition at line 573 of file GoBoard.h.
References m_anchor.
Referenced by GoBoard::AddStoneToBlock(), GoBoard::CheckConsistencyBlock(), GoBoard::IsInBlock(), and GoBoard::KillBlock().
void GoBoard::Block::AppendLiberty | ( | SgPoint | p | ) |
Definition at line 577 of file GoBoard.h.
References m_liberties, and SgSList< T, SIZE >::PushBack().
Referenced by GoBoard::AddStoneToBlock(), GoBoard::CreateSingleStoneBlock(), and GoBoard::MergeBlocks().
void GoBoard::Block::AppendStone | ( | SgPoint | p | ) |
Definition at line 579 of file GoBoard.h.
References m_stones, and SgSList< T, SIZE >::PushBack().
Referenced by GoBoard::AddStoneToBlock(), and GoBoard::MergeBlocks().
SgBlackWhite GoBoard::Block::Color | ( | ) | const |
Definition at line 581 of file GoBoard.h.
References m_color.
Referenced by GoBoard::CheckConsistencyBlock(), GoBoard::FullBoardRepetition(), GoBoard::IsLibertyOfBlock(), and GoBoard::KillBlock().
void GoBoard::Block::ExcludeLiberty | ( | SgPoint | p | ) |
Definition at line 583 of file GoBoard.h.
References SgSList< T, SIZE >::Exclude(), and m_liberties.
Referenced by GoBoard::UpdateBlocksAfterUndo().
void GoBoard::Block::Init | ( | SgBlackWhite | c, | |
SgPoint | anchor, | |||
GoPointList | stones, | |||
LibertyList | liberties | |||
) |
Definition at line 594 of file GoBoard.h.
References SgSList< T, SIZE >::Contains(), m_anchor, m_color, m_liberties, m_stones, SG_ASSERT, and SG_ASSERT_BW.
void GoBoard::Block::Init | ( | SgBlackWhite | c, | |
SgPoint | anchor | |||
) |
Definition at line 585 of file GoBoard.h.
References SgSList< T, SIZE >::Clear(), m_anchor, m_color, m_liberties, m_stones, SgSList< T, SIZE >::SetTo(), and SG_ASSERT_BW.
Referenced by GoBoard::CreateSingleStoneBlock(), GoBoard::InitBlock(), and GoBoard::MergeBlocks().
const LibertyList& GoBoard::Block::Liberties | ( | ) | const |
Definition at line 605 of file GoBoard.h.
References m_liberties.
Referenced by GoBoard::CheckConsistencyBlock().
int GoBoard::Block::NumLiberties | ( | ) | const |
Definition at line 607 of file GoBoard.h.
References SgSList< T, SIZE >::Length(), and m_liberties.
Referenced by GoBoard::OccupiedInAtari().
int GoBoard::Block::NumStones | ( | ) | const |
void GoBoard::Block::PopStone | ( | ) |
Definition at line 611 of file GoBoard.h.
References m_stones, and SgSList< T, SIZE >::PopBack().
Referenced by GoBoard::UpdateBlocksAfterUndo().
void GoBoard::Block::SetAnchor | ( | SgPoint | p | ) |
Definition at line 613 of file GoBoard.h.
References m_anchor.
Referenced by GoBoard::UpdateBlocksAfterUndo().
const GoPointList& GoBoard::Block::Stones | ( | ) | const |
Definition at line 615 of file GoBoard.h.
References m_stones.
Referenced by GoBoard::CheckConsistencyBlock(), GoBoard::FullBoardRepetition(), GoBoard::KillBlock(), GoBoard::RestoreKill(), and GoBoard::UpdateBlocksAfterUndo().
void GoBoard::Block::UpdateAnchor | ( | SgPoint | p | ) |
Definition at line 575 of file GoBoard.h.
References m_anchor.
Referenced by GoBoard::AddStoneToBlock(), and GoBoard::MergeBlocks().
SgPoint GoBoard::Block::m_anchor [private] |
Definition at line 618 of file GoBoard.h.
Referenced by Anchor(), Init(), SetAnchor(), and UpdateAnchor().
SgBlackWhite GoBoard::Block::m_color [private] |
LibertyList GoBoard::Block::m_liberties [private] |
Definition at line 622 of file GoBoard.h.
Referenced by AppendLiberty(), ExcludeLiberty(), Init(), Liberties(), and NumLiberties().
GoPointList GoBoard::Block::m_stones [private] |
Definition at line 624 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] |