Esempio n. 1
0
    IEnumerator StartGame(GameController gc)
    {
        if (testDelay == 0)
        {
            yield return(1);
        }
        else
        {
            yield return(new WaitForSeconds(testDelay));
        }

        mcts                 = new MCTS();
        mcts.budget          = budget;
        mcts.totalSimulation = totalSimulation;
        isMoveComputed       = false;
        mcts.C               = C;
        MCTS.TreeSize        = 0;
        MCTS.TreeSize        = 0;
        thread               = new Thread(() => mcts.UCTSearch(mode, this.MyTurnID, gc.grid.grid, gc.availableTiles, gc.player_tiles[gc.currentTurn], gc.player_tiles[1 - gc.currentTurn], callback));
        thread.Start();
    }