Iterate through all the liberties of a block. More...
#include <GoUctBoard.h>
Public Member Functions | |
LibertyIterator (const GoUctBoard &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 | |
GoUctBoard::Block::LibertyList::Iterator | m_it |
const GoUctBoard & | m_board |
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 401 of file GoUctBoard.h.
GoUctBoard::LibertyIterator::LibertyIterator | ( | const GoUctBoard & | bd, | |
SgPoint | p | |||
) |
Definition at line 468 of file GoUctBoard.h.
References m_board, GoUctBoard::Occupied(), and SG_ASSERT.
GoUctBoard::LibertyIterator::LibertyIterator | ( | const LibertyIterator & | ) | [private] |
Not implemented.
GoUctBoard::LibertyIterator::operator bool | ( | ) | const |
Return true if iteration is valid, otherwise false.
Definition at line 486 of file GoUctBoard.h.
References m_it.
SgPoint GoUctBoard::LibertyIterator::operator* | ( | ) | const |
void GoUctBoard::LibertyIterator::operator++ | ( | ) |
Advance the state of the iteration to the next liberty.
Definition at line 476 of file GoUctBoard.h.
References m_it.
LibertyIterator& GoUctBoard::LibertyIterator::operator= | ( | const LibertyIterator & | ) | [private] |
Not implemented.
const GoUctBoard& GoUctBoard::LibertyIterator::m_board [private] |
Definition at line 418 of file GoUctBoard.h.
Referenced by LibertyIterator().
GoUctBoard::Block::LibertyList::Iterator GoUctBoard::LibertyIterator::m_it [private] |
Definition at line 416 of file GoUctBoard.h.
Referenced by operator bool(), operator*(), and operator++().