Example #1
0
        public void UndoLastMove()
        {
            TicTacToeMove m = MoveHistory.Last() as TicTacToeMove;

            SetPosition(m.Position, 0);
            MoveHistory.RemoveAt(MoveHistory.Count - 1);
        }
 public void ApplyMove(TicTacToeMove m)
 {
     SetPosition(m.Position, CurrentPlayer);
     mMoveHistory.Add(m);
     mPlayer    = -mPlayer;
     IsFinished = GameIsOver();
 }
 public void ApplyMove(TicTacToeMove m)
 {
     SetPosition(m.Position, CurrentPlayer);
     mWeight += mPlayer * mWeights[m.Position.Row, m.Position.Col];
     mMoveHistory.Add(m);
     mPlayer    = -mPlayer;
     IsFinished = GameIsOver() || MoveHistory.Count == 9;
 }
Example #4
0
        public void ApplyMove(IGameMove move)
        {
            TicTacToeMove m = move as TicTacToeMove;

            SetPosition(m.Position, CurrentPlayer);
            MoveHistory.Add(m);
            mPlayer   = -mPlayer;
            mGameOver = GameIsOver();
        }
        public void UndoLastMove()
        {
            TicTacToeMove m = MoveHistory.Last() as TicTacToeMove;

            SetPosition(m.Position, 0);
            mMoveHistory.RemoveAt(MoveHistory.Count - 1);
            mValue     = 0;
            IsFinished = false;
        }
Example #6
0
        public void ApplyMove(IGameMove move)
        {
            TicTacToeMove m = move as TicTacToeMove;

            SetPosition(m.Position, CurrentPlayer);
            mWeight += mPlayer * mWeights[m.Position.Row, m.Position.Col];
            MoveHistory.Add(m);
            mPlayer   = -mPlayer;
            mGameOver = GameIsOver();
        }
Example #7
0
        public void UndoLastMove()
        {
            TicTacToeMove m = MoveHistory.Last() as TicTacToeMove;

            SetPosition(m.Position, 0);
            Value    = 0;
            mWeight += mPlayer * mWeights[m.Position.Row, m.Position.Col];
            mPlayer  = -mPlayer;
            MoveHistory.RemoveAt(MoveHistory.Count - 1);
        }
        public void UndoLastMove()
        {
            TicTacToeMove m = MoveHistory.Last();

            SetPosition(m.Position, 0);
            mMoveHistory.RemoveAt(MoveHistory.Count - 1);
            mWeight   += mPlayer * mWeights[m.Position.Row, m.Position.Col];
            mPlayer    = -mPlayer;
            mValue     = 0;
            IsFinished = false;
        }