예제 #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();
 }
예제 #3
0
 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;
 }
예제 #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;
        }
예제 #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();
        }
예제 #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);
        }
예제 #8
0
        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;
        }