Beispiel #1
0
        public void AutoOutCard()
        {
            OneSide oneSide = Battle.CurrentSide;

            bool isWin = IsWin(Battle.CurrentSide, true, null);

            if (isWin)
            {
                FlipCard();
            }
            else
            {
                Card card = ChessHelper.GetRecommendOutCard(oneSide.Cards);
                OutCard(oneSide, card.Type, card.Num, card.ID);
            }
        }
Beispiel #2
0
 public void HandOutCard(Battle battle)
 {
     SynchronousData(battle);
     if (BattleAIClient.SendServerCommand.UserID != battle.CurrentSide.AccountID)
     {
         return;
     }
     LogHelper.DebugLog("随机时间回调:" + BattleAIClient.SendServerCommand.UserID);
     Task.Factory.StartNew(() =>
     {
         Sleep();
         OneSide oneSide = battle.Sides.FirstOrDefault(c => c.AccountID == BattleAIClient.SendServerCommand.UserID);
         List <WinCardModel> winCardModels = WinALG.Win(oneSide.Cards, true);
         if (winCardModels.Count > 0)
         {
             BattleAIClient.SendServerCommand.HandOutCardBack(false, CardType.Tiao, 0, 0);
         }
         else
         {
             Card card = ChessHelper.GetRecommendOutCard(oneSide.Cards);
             BattleAIClient.SendServerCommand.HandOutCardBack(true, card.Type, card.Num, card.ID);
         }
     });
 }