#include <GoMoveExecutor.h>
Definition at line 17 of file GoMoveExecutor.h.
Public Member Functions | |
GoMoveExecutor (GoBoard &board, SgPoint move) | |
GoMoveExecutor (GoBoard &board, SgPoint move, SgBlackWhite player) | |
~GoMoveExecutor () | |
bool | IsLegal () const |
void | UndoMove () |
Can be used to undo the move before the MoveExecutor is destructed, to force the situation back the previous state. | |
Private Member Functions | |
GoMoveExecutor (const GoMoveExecutor &) | |
Not implemented. | |
GoMoveExecutor & | operator= (const GoMoveExecutor &) |
Not implemented. | |
Private Attributes | |
GoBoard & | m_board |
bool | m_isLegal |
Definition at line 20 of file GoMoveExecutor.h.
References m_board, m_isLegal, and GoBoardUtil::PlayIfLegal().
GoMoveExecutor::GoMoveExecutor | ( | GoBoard & | board, | |
SgPoint | move, | |||
SgBlackWhite | player | |||
) |
Definition at line 26 of file GoMoveExecutor.h.
References m_board, m_isLegal, and GoBoardUtil::PlayIfLegal().
GoMoveExecutor::~GoMoveExecutor | ( | ) |
GoMoveExecutor::GoMoveExecutor | ( | const GoMoveExecutor & | ) | [private] |
Not implemented.
bool GoMoveExecutor::IsLegal | ( | ) | const |
Definition at line 38 of file GoMoveExecutor.h.
References m_isLegal.
Referenced by GoBoardUtil::MoveLegalAndNotAtari(), and GoBoardUtil::MoveNotLegalOrAtari().
GoMoveExecutor& GoMoveExecutor::operator= | ( | const GoMoveExecutor & | ) | [private] |
Not implemented.
void GoMoveExecutor::UndoMove | ( | ) |
Can be used to undo the move before the MoveExecutor is destructed, to force the situation back the previous state.
Note that this can only be called for legal moves, and IsLegal returns false afterwards.
Definition at line 48 of file GoMoveExecutor.h.
References m_board, m_isLegal, SG_ASSERT, and GoBoard::Undo().
GoBoard& GoMoveExecutor::m_board [private] |
Definition at line 56 of file GoMoveExecutor.h.
Referenced by GoMoveExecutor(), UndoMove(), and ~GoMoveExecutor().
bool GoMoveExecutor::m_isLegal [private] |
Definition at line 58 of file GoMoveExecutor.h.
Referenced by GoMoveExecutor(), IsLegal(), UndoMove(), and ~GoMoveExecutor().