Exemplo n.º 1
0
        public AlphaBeta(GameBoard gameBoard, int ID, char Mark)
        {
            if (ID == 0)
            {
                throw new Exception("Player ID cannot be set to 0!");
            }

            this.gameBoard = gameBoard;
            this.ID        = ID;
            this.Mark      = Mark;

            ticTacToeProblem = new TicTacToeProblem(gameBoard, ID);
            alphabeta        = new Algorithms.AlphaBeta <GameBoard, Tuple <int, int> >(ticTacToeProblem);
        }
Exemplo n.º 2
0
        public MiniMax(GameBoard gameBoard, int ID, char Mark)
        {
            if (ID == 0)
            {
                throw new Exception("Player ID cannot be set to 0!");
            }

            this.gameBoard = gameBoard;
            this.ID        = ID;
            this.Mark      = Mark;

            ticTacToeProblem = new TicTacToeProblem(gameBoard, ID);
            minimax          = new Algorithms.MiniMax <GameBoard, Tuple <int, int> >(ticTacToeProblem);
        }