IEnumerator StartGame(GameController gc) { yield return(1); TileState ts = null; //ts = RandomMove(tileStates); AlphaBeta ab = new AlphaBeta(this.MyTurnID); ab.budget = TimeBudget; ab.depthBudget = DepthBudget; ab.randomMoveInLevels = randomMoveInLevels; isMoveComputed = false; ts = null; AlphaBeta.TotalNodesEvaluated = 0; AlphaBeta.MaxTreeSize = 0; AlphaBeta.TreeSize = 0; Thread thread = new Thread(() => ab.NextMove(gc.grid.grid, gc.player_tiles[gc.currentTurn], gc.player_tiles[1 - gc.currentTurn], gc.availableTiles, callback)); thread.Start(); //this.OnPlayFinished(ts); }