public void DoMove(GameMove move) { if (move.numberToMove > GetFreeSpaces() + 1) { throw new Exception("Not enough free spaces"); } MoveList.Push(move); move.DoMove(); }
public void UndoMove() { GameMove move = MoveList.Pop(); move.UndoMove(); }