//让后面的农民跑 private static List <Card> letFarmerGo(List <Card>[] peoplesCard, int whoOut, int nowPerson, int whoCanOut) { List <Card> curOutCards = nextRemindCard[0]; //如果是自己出牌(必须要出),想办法放农民跑 if (whoOut == nowPerson) { OutCardStyle nextCardStyle = OutCardStyle.judgeCardStyle(nextRemindCard[whoCanOut]); //如果后面的农民出的是炸弹或者是四大天王,自己就随便出 if (nextCardStyle.outCardStyleEnum == OutCardStyleEnum.BOMB || nextCardStyle.outCardStyleEnum == OutCardStyleEnum.FOUR_GHOST) { } //如果是单支或者是对子,拆任意牌,放农民走 else if (nextCardStyle.outCardStyleEnum == OutCardStyleEnum.ONE || nextCardStyle.outCardStyleEnum == OutCardStyleEnum.TWO) { List <Card> tempOutCards = new List <Card>(); switch (nextCardStyle.outCardStyleEnum) { case OutCardStyleEnum.ONE: tempOutCards = CrushPreCard.findMinOneTwo(peoplesCard[nowPerson], 1); break; case OutCardStyleEnum.TWO: tempOutCards = CrushPreCard.findMinOneTwo(peoplesCard[nowPerson], 2); break; } if (tempOutCards.Count > 0 && tempOutCards[0].cardSize < nextCardStyle.firstCardSize) { curOutCards = tempOutCards; } } //如果是其他类型的牌 else { //找同类型自己能出的最小的牌(可以拆)(利用玩家的提示) People people = new People(); people.deck = peoplesCard[nowPerson]; people.htStyle = nextCardStyle.outCardStyleEnum; PlayerRemindCard.peopleFirstHint(people, true); //判断当前出了以后,后面的农民能不能跑 OutCardStyle myCardOutStyle = OutCardStyle.judgeCardStyle(people.htCards); //不能出证明放不了,就随便出 if (myCardOutStyle.outCardStyleEnum == nextCardStyle.outCardStyleEnum && myCardOutStyle.firstCardSize < nextCardStyle.firstCardSize) { curOutCards = people.htCards; } } } //如果可以不出,则不出 else { curOutCards.Clear(); } return(curOutCards); }
//玩家任意出牌的游戏提示,记录上次找的牌 private static List <Card> remindCard(List <Card> deck, List <Card> prevCard) { //判断上家的卡组样式 OutCardStyle preOutCardStyle = OutCardStyle.judgeCardStyle(prevCard); //如果想出什么牌就出什么牌 if (preOutCardStyle.outCardStyleEnum == OutCardStyleEnum.CANT_OUT) { return(Robort_Free_Remind(deck)); } //要不住,提示炸弹 else { return(CrushPreCard.crushPreCard(deck, preOutCardStyle, true, false)); } }
//玩家任意出牌的游戏提示,记录上次找的牌 public static void remindCard(People people, List <Card> prevCard, bool canOutBoom) { //判断上家的卡组样式 OutCardStyle preOutCardStyle = OutCardStyle.judgeCardStyle(prevCard); //如果想出什么牌就出什么牌 if (preOutCardStyle.outCardStyleEnum == OutCardStyleEnum.CANT_OUT) { people.htCards = new List <Card>(); peopleFirstHint(people, true); } //打上一家出的牌(如果是打自己出的牌,canOutBoom=false) else { people.htCards = CrushPreCard.crushPreCard(people.deck, preOutCardStyle, canOutBoom, true); } }