Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoMoveExecutor Class Reference

#include <GoMoveExecutor.h>

List of all members.


Detailed Description

Used to execute and undo one move without having to worry about undoing the move.

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.
GoMoveExecutoroperator= (const GoMoveExecutor &)
 Not implemented.

Private Attributes

GoBoardm_board
bool m_isLegal


Constructor & Destructor Documentation

GoMoveExecutor::GoMoveExecutor ( GoBoard board,
SgPoint  move 
)

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 (  ) 

Definition at line 32 of file GoMoveExecutor.h.

References m_board, m_isLegal, and GoBoard::Undo().

GoMoveExecutor::GoMoveExecutor ( const GoMoveExecutor  )  [private]

Not implemented.


Member Function Documentation

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().


Member Data Documentation

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().


The documentation for this class was generated from the following file:


17 Jun 2010 Doxygen 1.4.7