Esempio n. 1
0
        public override int GetNextMove()
        {
            int nextCol = minimax.MINIMAX_DECISION(_game);

            System.Diagnostics.Debug.Assert(_game.IsMoveValid(nextCol));

            _game.AcceptMove(this.ID, nextCol);

            return(nextCol);
        }
Esempio n. 2
0
        static void DiagnoseFdUpMoves()
        {
            Game g = new Game()
            {
                Rows = 6,
                Columns = 7,
                PiecesToWin = 4,
                TimeLimitSeconds = 30000
            };

            g.Initialize();

            g.AcceptMove(Players.Black, 3);
            g.AcceptMove(Players.Red, 4);
            g.AcceptMove(Players.Black, 3);
            g.AcceptMove(Players.Red, 3);

            MinimaxCs.Minimax m = new MinimaxCs.Minimax(Players.Black);

            int col = m.MINIMAX_DECISION(g);
        }
Esempio n. 3
0
        static void DiagnoseFdUpMoves()
        {
            Game g = new Game()
            {
                Rows             = 6,
                Columns          = 7,
                PiecesToWin      = 4,
                TimeLimitSeconds = 30000
            };

            g.Initialize();

            g.AcceptMove(Players.Black, 3);
            g.AcceptMove(Players.Red, 4);
            g.AcceptMove(Players.Black, 3);
            g.AcceptMove(Players.Red, 3);

            MinimaxCs.Minimax m = new MinimaxCs.Minimax(Players.Black);

            int col = m.MINIMAX_DECISION(g);
        }