Ejemplo n.º 1
0
        public string PlayAI(int time)
        {
            root = MCTS.Run(root, board, time);

            int x = root.Action, y = 0;

            while (board[x, y] != MCTS.FREE)
            {
                y++;
            }
            board[x, y] = MCTS.ME;

            return(root.ToString());
        }
Ejemplo n.º 2
0
        public void Play(int x)
        {
            int y = 0;

            while (board[x, y] != MCTS.FREE)
            {
                y++;
            }
            board[x, y] = MCTS.OPPONENT;

            if (root != null)
            {
                root = root.Childs.FirstOrDefault(c => c.Action == x);
            }
        }