public override PlayerTask GetMove(POGame game) { playerid = game.CurrentPlayer.PlayerId; thinkcounter++; sw.Start(); float timeLeft = 1 - sw.ElapsedMilliseconds / 30000.0f; List <PlayerTask> options = game.CurrentPlayer.Options(); Dictionary <PlayerTask, int> values = new Dictionary <PlayerTask, int>(); int depth = 2; if (sw.ElapsedMilliseconds > 15000) { depth--; } if (sw.ElapsedMilliseconds > 25000) { depth--; } values = SimulateAll(game, options, depth); PlayerTask besttask = values.OrderBy(x => x.Value).ToList().Last().Key; game.Process(besttask); if (Score(game) == int.MaxValue) { Console.WriteLine("Won after: " + Math.Round(sw.ElapsedMilliseconds / 1000.0f) + "s; Turns: " + thinkcounter); } sw.Stop(); return(besttask); }