Iterate through all the stones of a block. More...
#include <GoBoard.h>
Public Member Functions | |
StoneIterator (const GoBoard &bd, SgPoint p) | |
void | operator++ () |
Advance the state of the iteration to the next stone. | |
SgPoint | operator* () const |
Return the current stone. | |
operator bool () const | |
Return true if iteration is valid, otherwise false. | |
Private Member Functions | |
StoneIterator (const StoneIterator &) | |
Not implemented. | |
StoneIterator & | operator= (const StoneIterator &) |
Not implemented. | |
Private Attributes | |
GoBoard::Block::StoneIterator | m_it |
Iterator over original list in GoBoard::Block::StoneList. | |
const GoBoard & | m_board |
uint64_t | m_countPlay |
Iterate through all the stones of a block.
Point 'p' must be occupied. Also, the stones can only be accessed for the current board position.
Definition at line 878 of file GoBoard.h.
Definition at line 998 of file GoBoard.h.
References GoBoard::CountPlay(), m_board, m_countPlay, GoBoard::Occupied(), and SG_ASSERT.
GoBoard::StoneIterator::StoneIterator | ( | const StoneIterator & | ) | [private] |
Not implemented.
GoBoard::StoneIterator::operator bool | ( | ) | const |
SgPoint GoBoard::StoneIterator::operator* | ( | ) | const |
Return the current stone.
Definition at line 1013 of file GoBoard.h.
References GoBoard::CountPlay(), m_board, m_countPlay, m_it, and SG_ASSERT.
void GoBoard::StoneIterator::operator++ | ( | ) |
StoneIterator& GoBoard::StoneIterator::operator= | ( | const StoneIterator & | ) | [private] |
Not implemented.
const GoBoard& GoBoard::StoneIterator::m_board [private] |
Definition at line 900 of file GoBoard.h.
Referenced by operator*(), and StoneIterator().
uint64_t GoBoard::StoneIterator::m_countPlay [private] |
Definition at line 903 of file GoBoard.h.
Referenced by operator*(), and StoneIterator().
Iterator over original list in GoBoard::Block::StoneList.
No copy of list is necessary, even if moves are played and undone while iterating over the list, since the implementation of GoBoard does guarantee that the order of the block's stone list is preserved.
Definition at line 898 of file GoBoard.h.
Referenced by operator bool(), operator*(), and operator++().