예제 #1
0
//获取扑克类型
BYTE CGameLogic::GetCardKind(BYTE bCardList[], BYTE bCardCount)
{
	if (IsTongHuaShun(bCardList,bCardCount)) return TONG_HUA_SHUN;
	if (IsTieZhi(bCardList,bCardCount)) return TIE_ZHI;
	if (IsHuLu(bCardList,bCardCount)) return HU_LU;
	if (IsTongHua(bCardList,bCardCount)) return TONG_HUA;
	if (IsShunZhi(bCardList,bCardCount)) return SHUN_ZI;
	if (IsSanTiao(bCardList,bCardCount)) return SAN_TIAO;
	if (IsLiangDui(bCardList,bCardCount)) return LAING_DUI;
	if (IsDuiZhi(bCardList,bCardCount)) return DUI_ZI;
	return SHAN;
}
예제 #2
0
//获取类型
BYTE CGameLogic::GetCardType(BYTE cbCardData[], BYTE cbCardCount)
{
	//类型判断
	if (IsTongHuaShun(cbCardData,cbCardCount)) return CT_TONG_HUA_SHUN;
	if (IsTieZhi(cbCardData,cbCardCount)) return CT_TIE_ZHI;
	if (IsHuLu(cbCardData,cbCardCount)) return CT_HU_LU;
	if (IsTongHua(cbCardData,cbCardCount)) return CT_TONG_HUA;
	if (IsShunZhi(cbCardData,cbCardCount)) return CT_SHUN_ZI;
	if (IsSanTiao(cbCardData,cbCardCount)) return CT_THREE_TIAO;
	if (IsDouble(cbCardData,cbCardCount)) return CT_DOUBLE;
	if (cbCardCount==1) return CT_SINGLE;

	return CT_ERROR;
}