Ejemplo n.º 1
0
 public static List <List <CardInfo> > GetRecommendedCards(List <CardInfo> myCards, bool forward = true, List <CardInfo> topCards = null)
 {
     // Debug.LogError("myCards.Count=" + myCards.Count);
     // 主动出牌提示
     if (forward)
     {
         // return CardUtil.AIFindActiveCards(myCards);
         Dictionary <string, int> intMap = new Dictionary <string, int> {
             { "3", 2 },
             { "4", 3 },
             { "5", 4 },
             { "6", 5 },
             { "7", 6 },
             { "8", 7 },
             { "9", 8 },
             { "10", 9 },
             { "J", 10 },
             { "Q", 11 },
             { "K", 12 },
             { "A", 0 },
             { "2", 1 },
             { "joker", 52 },
             { "JOKER", 53 }
         };
         List <string> rC = new List <string>();
         foreach (CardInfo ci in myCards)
         {
             rC.Add(ci.serverNum.ToString());
         }
         DizhuPromptAI_Freeout_V1 AI = new DizhuPromptAI_Freeout_V1();
         List <int> ic = new List <int>();
         foreach (var i in rC)
         {
             ic.Add(intMap[i]);
         }
         List <List <int> > ret = AI.AI_promptCards(ic);
         return(null);
     }
     else
     {
         Debug.Assert(null != topCards);
         CardType cardType = CardUtil.CheckCardType(topCards, out int lv);
         return(CardUtil.AIFindWinCards(myCards, topCards, cardType));
     }
 }