Beispiel #1
0
        private static async Task <int> MakeMove(
            IMyActor p1,
            IMyActor p2,
            ActorId gameId)
        {
            Random rand = new Random();
            int    c    = await p1.GetCountAsync();

            await Task.Delay(rand.Next(500, 2000));

            return(c);
        }
Beispiel #2
0
 private async Task <IActionResult> GetActorCount(IMyActor actor)
 => SuccessResult(await actor.GetCountAsync(CancellationToken.None));