Exemple #1
0
        public Move Minimax(TicTacToe.Marble player, int depth)
        {
            foreach (var move in game.GetPossibleMoves(player))
            {
                TicTacToe cpyOfBoard = new TicTacToe(game);
            }

            throw new NotImplementedException();
        }
Exemple #2
0
 public void InitGame()
 {
     ttt                 = new TicTacToe();
     turn                = TicTacToe.Marble.CROSS;
     TurnLabel.Text      = "Turn:";
     GameStateLabel.Text = "Place new marble";
     this.BackColor      = Color.White;
     Invalidate(true);
 }
Exemple #3
0
 public void InitGame()
 {
     ttt            = new TicTacToe();
     turn           = TicTacToe.Marble.CROSS;
     label1.Text    = "Turn:";
     label2.Text    = "Place new marble";
     this.BackColor = Color.White;
     Invalidate(true);
     cpu = new ComputerPlayer(ttt);
 }
Exemple #4
0
        private void testGameOver()
        {
            if (ttt.IsWinner(turn))
            {
                GameStateLabel.Text = "Game Over";
                TurnLabel.Text      = "Winner:";
                this.BackColor      = Color.Yellow;
                return;
            }

            if (ttt.InInsertingState())
            {
                GameStateLabel.Text = "Place new marble";
            }
            else
            {
                GameStateLabel.Text = "Move a marble to an empty place";
            }

            turn = ttt.Reverse(turn);
        }
Exemple #5
0
 public Move(int location, TicTacToe.Marble player)
 {
     Location = location;
     Player   = player;
 }