Iterate through all the liberties of a block. More...
#include <GoBoard.h>
Public Member Functions | |
LibertyIterator (const GoBoard &bd, SgPoint p) | |
void | operator++ () |
Advance the state of the iteration to the next liberty. | |
SgPoint | operator* () const |
Return the current liberty. | |
operator bool () const | |
Return true if iteration is valid, otherwise false. | |
Private Member Functions | |
LibertyIterator (const LibertyIterator &) | |
Not implemented. | |
LibertyIterator & | operator= (const LibertyIterator &) |
Not implemented. | |
Private Attributes | |
Block::LibertyList::Iterator | m_it |
const GoBoard & | m_board |
uint64_t | m_countPlay |
Iterate through all the liberties of a block.
Point 'p' must be occupied. Liberties should only be accessed for the current board position. No moves are allowed to be executed during the iteration.
Definition at line 925 of file GoBoard.h.
Definition at line 1030 of file GoBoard.h.
References GoBoard::CountPlay(), m_board, m_countPlay, GoBoard::Occupied(), and SG_ASSERT.
GoBoard::LibertyIterator::LibertyIterator | ( | const LibertyIterator & | ) | [private] |
Not implemented.
GoBoard::LibertyIterator::operator bool | ( | ) | const |
SgPoint GoBoard::LibertyIterator::operator* | ( | ) | const |
Return the current liberty.
Definition at line 1045 of file GoBoard.h.
References GoBoard::CountPlay(), m_board, m_countPlay, m_it, and SG_ASSERT.
void GoBoard::LibertyIterator::operator++ | ( | ) |
LibertyIterator& GoBoard::LibertyIterator::operator= | ( | const LibertyIterator & | ) | [private] |
Not implemented.
const GoBoard& GoBoard::LibertyIterator::m_board [private] |
Definition at line 942 of file GoBoard.h.
Referenced by LibertyIterator(), and operator*().
uint64_t GoBoard::LibertyIterator::m_countPlay [private] |
Definition at line 945 of file GoBoard.h.
Referenced by LibertyIterator(), and operator*().
Block::LibertyList::Iterator GoBoard::LibertyIterator::m_it [private] |
Definition at line 940 of file GoBoard.h.
Referenced by operator bool(), operator*(), and operator++().