Пример #1
0
 private void GetGuess(GameEventHub ctx, PlayerIndex nextTurn, IInvokablePlayer bot)
 {
     // TODO async
     Delay();
     while (true)
     {
         var count = bot.GetGuess(ctx.State);
         if (ctx.TryGiveGuess(nextTurn, count))
         {
             break;
         }
     }
 }
Пример #2
0
 private void GetMove(GameEventHub ctx, PlayerIndex nextTurn, IInvokablePlayer bot)
 {
     // TODO async
     Delay();
     while (true)
     {
         var card = bot.GetMove(ctx.State);
         if (ctx.TryPlayCard(nextTurn, card))
         {
             break;
         }
     }
 }
Пример #3
0
 protected Player(PlayerInfo info, IInvokablePlayer invokable)
 {
     Info      = info;
     Invocable = invokable;
 }