Beispiel #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;
         }
     }
 }
Beispiel #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;
         }
     }
 }
Beispiel #3
0
 protected Player(PlayerInfo info, IInvokablePlayer invokable)
 {
     Info      = info;
     Invocable = invokable;
 }