public void GameLogicCheck(BRANDSTATUS brandStatus,List<Card> brand)//检测
{
if (ownCardList.Count <= 0)//校检
return;
Card pCompareCard= null; //获取用来比较的牌
int iTempNum = 0;
if(brand != null && brand.Count > 0)
{
pCompareCard= brand[0];
for (int j = 0;j < brand.Count;j++)
{
if (brand[j].CardsEven > pCompareCard.CardsEven)
{
pCompareCard = brand[j];
}
}
iTempNum = pCompareCard.num;
}
switch(brandStatus)
{
case BRANDSTATUS._1://1张
GameLogicCheck_1(iTempNum);
break;
case BRANDSTATUS._1P://1对
GameLogicCheck_2(iTempNum);
break;
case BRANDSTATUS._1T0://1个三顺
GameLogicCheck_3(iTempNum);
break;
case BRANDSTATUS._1T1://3带1
GameLogicCheck_1T1(iTempNum);
break;
case BRANDSTATUS._1T2://3带一对
GameLogicCheck_1T2(iTempNum);
break;
case BRANDSTATUS._5ALONG:
case BRANDSTATUS._6ALONG:
case BRANDSTATUS._7ALONG:
case BRANDSTATUS._8ALONG:
case BRANDSTATUS._9ALONG:
case BRANDSTATUS._10ALONG:
case BRANDSTATUS._11ALONG:
case BRANDSTATUS._12ALONG:
GameLogicCheck_Along(brandStatus, iTempNum);
break;
case BRANDSTATUS._3P:
case BRANDSTATUS._4P:
case BRANDSTATUS._5P:
case BRANDSTATUS._6P://6对
case BRANDSTATUS._7P://7对
case BRANDSTATUS._8P://8对
case BRANDSTATUS._9P://9对
case BRANDSTATUS._10P://10对
GameLogicCheck_AlongPairs(brandStatus, iTempNum);
break;
case BRANDSTATUS._2T0:
case BRANDSTATUS._3T0:
case BRANDSTATUS._4T0:
case BRANDSTATUS._5T0: //5个3带0
case BRANDSTATUS._6T0: //6个3带0
GameLogicCheck_Plane_NoWings(brandStatus, iTempNum);
break;
case BRANDSTATUS._2T1:
case BRANDSTATUS._3T1:
case BRANDSTATUS._4T1:
case BRANDSTATUS._5T1:
GameLogicCheck_Plane_OneWings(brandStatus, iTempNum);
break;
case BRANDSTATUS._2T2:
case BRANDSTATUS._3T2: //3个3带2
case BRANDSTATUS._4T2: //4个3带2
GameLogicCheck_Plane_TwoWings(brandStatus, iTempNum);
break;
case BRANDSTATUS._4F11:
case BRANDSTATUS._4F22:
GameLogicCheck_FourTake(brandStatus, iTempNum);
break;
case BRANDSTATUS._BOMB:
GameLogicCheck_Bomb(iTempNum);
break;
}
}
斗地主检测牌型(电脑)
最新推荐文章于 2020-03-27 13:37:08 发布