Remembers the state of a board and restores it in its destructor. More...
#include <GoBoardRestorer.h>
Public Member Functions | |
GoBoardRestorer (GoBoard &bd) | |
~GoBoardRestorer () | |
Private Types | |
typedef SgArrayList < GoPlayerMove, GO_MAX_NUM_MOVES > | MoveList |
Private Attributes | |
GoBoard & | m_bd |
int | m_size |
GoRules | m_rules |
MoveList | m_moves |
Remembers the state of a board and restores it in its destructor.
Definition at line 13 of file GoBoardRestorer.h.
typedef SgArrayList<GoPlayerMove,GO_MAX_NUM_MOVES> GoBoardRestorer::MoveList [private] |
Definition at line 21 of file GoBoardRestorer.h.
GoBoardRestorer::GoBoardRestorer | ( | GoBoard & | bd | ) |
Definition at line 15 of file GoBoardRestorer.cpp.
References m_moves, GoBoard::Move(), GoBoard::MoveNumber(), and SgArrayList< T, SIZE >::PushBack().
GoBoardRestorer::~GoBoardRestorer | ( | ) |
Definition at line 24 of file GoBoardRestorer.cpp.
References GoBoard::Init(), SgArrayList< GoPlayerMove, GO_MAX_NUM_MOVES >::Iterator, m_bd, m_moves, m_size, GoBoard::Play(), GoBoard::Size(), and GoBoardUtil::UndoAll().
GoBoard& GoBoardRestorer::m_bd [private] |
Definition at line 23 of file GoBoardRestorer.h.
Referenced by ~GoBoardRestorer().
MoveList GoBoardRestorer::m_moves [private] |
Definition at line 29 of file GoBoardRestorer.h.
Referenced by GoBoardRestorer(), and ~GoBoardRestorer().
GoRules GoBoardRestorer::m_rules [private] |
Definition at line 27 of file GoBoardRestorer.h.
int GoBoardRestorer::m_size [private] |
Definition at line 25 of file GoBoardRestorer.h.
Referenced by ~GoBoardRestorer().