private void Test25() { DizhuPromptAI_Follow_V1 AI = new DizhuPromptAI_Follow_V1(); List <int> topCards = new List <int> { 30 }; List <int> myCards = new List <int> { 6, 40, 17, 5, 15, 14, 32, 12, 4, 27, 35, 29, 52, 16, 11, 28, 36, 0, 48 }; List <List <int> > ret = AI.AI_promptCards(topCards, myCards); Debug.Log("before return"); }
public static List <List <string> > GetRecommendedCards(List <int> myCards, List <int> topCards) { // 跟牌提示 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 } }; DizhuPromptAI_Follow_V1 AI = new DizhuPromptAI_Follow_V1(); List <string> myCardsStr = AI._transToReadableCards(myCards); List <string> topCardsStr = AI._transToReadableCards(topCards); List <int> myCardsTrans = new List <int>(); List <int> topCardsTrans = new List <int>(); foreach (var i in myCardsStr) { myCardsTrans.Add(intMap[i]); } foreach (var i in topCardsStr) { topCardsTrans.Add(intMap[i]); } List <List <int> > ret = AI.AI_promptCards(topCardsTrans, myCardsTrans); List <List <string> > strRet = new List <List <string> >(); foreach (var r in ret) { List <string> rdeckCards = AI._transToReadableCards(r); strRet.Add(rdeckCards); } return(strRet); }