hengyang_client/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua

682 lines
20 KiB
Lua
Raw Normal View History

2025-04-29 19:34:41 +08:00
local CardCheck = {
cardList = {},
cardListSord = {},
2025-04-29 19:34:41 +08:00
cardNum = 0,
cardSize = 0,
long = false,
planeNoBelt = false,
threeNoBelt = false,
planelack = false,
threelack = false,
2025-05-08 12:41:42 +08:00
fourDaiThree = false,
2025-05-10 15:38:54 +08:00
fristCard = true,
tipCardList = {},
touchCardSet = {},
touchCardMao = {}
2025-05-08 12:41:42 +08:00
}
2025-05-10 15:38:54 +08:00
local CardType = {
2025-05-08 12:41:42 +08:00
one = 1,
long = 2,
dui = 3,
2025-05-13 10:30:27 +08:00
duiLong = 10,
2025-05-08 12:41:42 +08:00
threeAndTwo = 4,
normolPlant = 5,
zha = 6,
onlyThree = 7,
onlyPlant = 8,
zhaAndThreee = 9,
lessThree = 11,
lessPlant = 12
2025-04-29 19:34:41 +08:00
}
local M = CardCheck
2025-05-10 15:38:54 +08:00
function M:InitFlag()
2025-04-29 19:34:41 +08:00
local config = DataManager.CurrenRoom.room_config.config
self.planeNoBelt = config.planeNoBelt == 1
self.threeNoBelt = config.threeNoBelt == 1
self.planelack = config.planelack == 1
self.threelack = config.threelack == 1
self.fourDaiThree = config.fourDaiThree
2025-05-08 14:57:15 +08:00
self._flag_fristCard = true
2025-04-29 19:34:41 +08:00
print("==============================lingmengcheckinitFlag")
pt(config)
pt(self)
return self
end
2025-05-13 10:30:27 +08:00
function M:InitLastCard(cardList, mustPutMaxCard)
2025-05-08 14:57:15 +08:00
self._flag_fristCard = false
2025-05-13 10:30:27 +08:00
self:Clear()
self._flag_mustMax = mustPutMaxCard
self.type = 0
2025-09-27 17:59:31 +08:00
self.specilCard = {}
2025-05-13 10:30:27 +08:00
self.lastCardNum = #cardList
self._flag_allCards = false
self._flag_checkLst = true
2025-05-08 12:41:42 +08:00
if #cardList == 0 then
2025-05-08 14:57:15 +08:00
self._flag_fristCard = true
2025-05-08 12:41:42 +08:00
return
end
table.sort(cardList)
pt(cardList)
2025-05-10 15:38:54 +08:00
self.lastMinCard = math.floor(cardList[1] / 10)
2025-05-08 14:23:48 +08:00
local temp_long = 0
for i = 1, #cardList do
local number = math.floor(cardList[i] / 10)
if self.cardList[number] then
self.cardList[number] = self.cardList[number] + 1
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
end
self.cardNum = self.cardNum + 1
if i == 1 then
temp_long = 1
elseif temp_long == i - 1 then
2025-05-08 14:57:15 +08:00
if math.abs(math.floor(cardList[i - 1] / 10) - number) == 1 then
2025-05-08 14:23:48 +08:00
temp_long = i
end
end
end
2025-05-08 16:02:39 +08:00
self.long = temp_long == self.cardNum and self.cardNum >= 5
2025-05-08 14:23:48 +08:00
print("lingmengCheckAloneOrLong2")
if self:CheckAloneOrLong() then
self.type = self:CheckAloneOrLong()
return
end
print("lingmengCheckDuiZi2")
if self:CheckDuiZi() then
self.type = self:CheckDuiZi()
return
end
print("lingmengCheckSanDai2")
if self:CheckSanDai() then
2025-09-27 17:59:31 +08:00
local a, b, c = self:CheckSanDai()
self.type = a
if b then
self.specilCard = b
end
if c then
self.lastMinCard = c
end
2025-05-08 14:23:48 +08:00
return
end
print("lingmengCheckZha2")
if self:CheckZha() then
2025-09-27 17:59:31 +08:00
local a, b, c = self:CheckZha()
self.type = a
if b then
self.specilCard = b
end
if c then
self.lastMinCard = c
end
2025-05-08 14:23:48 +08:00
return
end
2025-05-13 10:30:27 +08:00
if self.type == 0 then
2025-05-08 14:23:48 +08:00
ViewUtil.ErrorTip(-1, "上一份牌型判断错误")
end
2025-05-08 12:41:42 +08:00
end
2025-05-08 14:23:48 +08:00
function M:initCards(cardList, flag, flag_allCards)
print("lingmenginitCards")
pt(cardList)
2025-04-29 19:34:41 +08:00
local temp_long = 0
self:Clear()
self._flag_allCards = flag_allCards or false
2025-04-29 19:34:41 +08:00
if flag then
for i = 1, #cardList do
local number = math.floor(cardList[i][1].card_code_number / 10)
if self.cardList[number] then
self.cardList[number] = self.cardList[number] + 1
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
2025-04-29 19:34:41 +08:00
end
self.cardNum = self.cardNum + 1
if i == 1 then
temp_long = 1
elseif temp_long == i - 1 then
if math.abs(math.floor(cardList[i - 1][1].card_code_number / 10) - number) == 1 then
temp_long = i
end
end
end
else
for i = 1, #cardList do
local number = math.floor(cardList[i].card_code_number / 10)
if self.cardList[number] then
self.cardList[number] = self.cardList[number] + 1
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
2025-04-29 19:34:41 +08:00
end
self.cardNum = self.cardNum + 1
if i == 1 then
temp_long = 1
elseif temp_long == i - 1 then
if math.abs(math.floor(cardList[i - 1].card_code_number / 10) - number) == 1 then
temp_long = i
end
end
end
end
2025-04-29 19:48:08 +08:00
2025-04-29 19:34:41 +08:00
print(self.cardNum, self.cardSize, temp_long)
pt(self.cardList)
self.long = temp_long == self.cardNum and self.cardNum >= 5
2025-04-29 19:34:41 +08:00
end
function M:CheckCards()
2025-05-10 15:38:54 +08:00
if self.cardNum ~= 4 and self.cardNum ~= self.lastCardNum and not self._flag_fristCard then
2025-05-09 16:56:59 +08:00
return
end
2025-05-13 10:30:27 +08:00
if self.cardNum == 1 and self._flag_mustMax and self.maxCard ~= self.cardListSord[1] then
return
end
if self.cardNum == 0 then
return
end
2025-05-09 16:56:59 +08:00
2025-05-07 15:38:38 +08:00
print("lingmengCheckAloneOrLong")
2025-04-29 19:34:41 +08:00
if self:CheckAloneOrLong() then
return true
end
2025-05-07 15:38:38 +08:00
print("lingmengCheckDuiZi")
2025-04-29 19:34:41 +08:00
if self:CheckDuiZi() then
2025-05-13 11:23:29 +08:00
return true
2025-04-29 19:34:41 +08:00
end
2025-05-07 15:38:38 +08:00
print("lingmengCheckSanDai")
2025-04-29 19:34:41 +08:00
if self:CheckSanDai() then
return true
end
2025-05-07 15:38:38 +08:00
print("lingmengCheckZha")
2025-04-29 19:34:41 +08:00
if self:CheckZha() then
return true
end
return false
end
2025-05-10 15:38:54 +08:00
function M:CheckOutCard(cardList)
2025-05-13 10:30:27 +08:00
print("lingmengCheckOutCard===============")
pt(cardList)
2025-05-10 15:38:54 +08:00
self.tipCardList = {}
self.touchCardSet = {}
self.touchCardMao = {}
local cardMap = {}
local cardSet = {}
2025-05-13 10:30:27 +08:00
local temp_long = 0
local temp_longList = {}
local longList = {}
local lastCard = -1
2025-05-10 15:38:54 +08:00
2025-05-13 10:30:27 +08:00
local flag_threeOrFour = false
2025-05-10 15:38:54 +08:00
for i = 1, #cardList do
local number = math.floor(cardList[i].card_code_number / 10)
if cardMap[number] then
cardMap[number].value = cardMap[number].value + 1
table.insert(cardMap[number].cardList, cardList[i])
else
cardMap[number] = {}
cardMap[number].value = 1
cardMap[number].cardList = {}
table.insert(cardMap[number].cardList, cardList[i])
table.insert(cardSet, number)
end
2025-05-13 10:30:27 +08:00
if cardMap[number].value >= 3 then
flag_threeOrFour = true
end
if lastCard ~= number then
if lastCard - number ~= 1 then
if temp_long >= 5 then
table.insert(longList, temp_longList)
end
temp_long = 1
temp_longList = {}
else
temp_long = temp_long + 1
end
lastCard = number
table.insert(temp_longList, number)
end
end
if temp_long >= 4 then
table.insert(longList, temp_longList)
2025-05-10 15:38:54 +08:00
end
table.sort(cardSet)
2025-05-13 10:30:27 +08:00
self.maxCard = cardSet[#cardSet]
if self._flag_fristCard then
if self._flag_mustMax then
self:CheckOutCardGetMustMax(cardSet, cardMap, flag_threeOrFour, longList)
else
self:CheckOutCardGetFristTipList(cardSet, cardMap)
end
return
end
local cardType, only, longLength = self:CheckOutCardGetType()
local tipCardSet = self:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
2025-05-10 15:38:54 +08:00
2025-05-13 10:30:27 +08:00
self:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
2025-05-10 15:38:54 +08:00
2025-05-13 10:30:27 +08:00
if cardType >= 3 and only == 0 then
self:CheckOutCardGetAllCardSetAndMap()
end
end
function M:CheckOutCardGetAllCardSetAndMap()
self.touchCardSet = {}
self.touchCardMao = {}
for i = 3, 15 do
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
end
end
function M:CheckOutCardGetFristTipList(cardSet, cardMap)
for i = 1, #cardSet do
local card = cardSet[i]
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
local temp = {}
table.insert(temp, cardMap[card].cardList[1])
table.insert(self.tipCardList, temp)
end
end
function M:CheckOutCardGetMustMax(cardSet, cardMap, flag_threeOrFour, longList)
if flag_threeOrFour then
for i = 3, 15 do
if cardMap[i] then
if i == cardSet[#cardSet] then
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
table.insert(self.tipCardList, cardMap[i].cardList)
elseif cardMap[i].value >= 2 then
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
table.insert(self.tipCardList, cardMap[i].cardList)
else
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
end
else
table.insert(self.touchCardSet, i)
self.touchCardMao[i] = 1
end
end
else
for i = 1, #cardSet do
local card = cardSet[i]
if i == #cardSet then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
table.insert(self.tipCardList, cardMap[card].cardList)
elseif cardMap[card].value >= 2 then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
table.insert(self.tipCardList, cardMap[card].cardList)
end
end
end
---单数顺另外添加到提示和现实
for i = 1, #longList do
local tempTipList = {}
for j = 1, #longList[i] do
local card = longList[i][j]
if not self.touchCardMao[card] then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
end
table.insert(tempTipList, cardMap[card].cardList[1])
end
table.insert(self.tipCardList, tempTipList)
end
2025-05-10 15:38:54 +08:00
end
function M:CheckOutCardGetType()
local cardType = 0
local only = 0
local longLength = 1
2025-05-13 10:30:27 +08:00
if self.type == 0 then
return cardType, only, longLength
end
2025-05-10 15:38:54 +08:00
if self.type == CardType.one or self.type == CardType.long then
cardType = 1
if self.type == CardType.long then
longLength = self.lastCardNum
end
2025-05-13 10:30:27 +08:00
elseif self.type == CardType.dui or self.type == CardType.duiLong then
2025-05-10 15:38:54 +08:00
cardType = 2
if self.lastCardNum > 2 then
2025-05-13 10:30:27 +08:00
longLength = self.lastCardNum / 2
2025-05-10 15:38:54 +08:00
end
elseif self.type == CardType.threeAndTwo or self.type == CardType.onlyThree or self.type == CardType.lessThree or self.type == CardType.normolPlant or self.type == CardType.onlyPlant or self.type == CardType.lessPlant then
2025-05-10 15:38:54 +08:00
cardType = 3
if self.type == CardType.onlyThree or self.type == CardType.onlyPlant then
only = 1
if self.type == CardType.onlyPlant then
2025-05-13 10:30:27 +08:00
longLength = self.lastCardNum / 3
2025-05-10 15:38:54 +08:00
end
end
if self.type == CardType.normolPlant then
2025-05-13 10:30:27 +08:00
longLength = self.lastCardNum / 5
2025-05-10 15:38:54 +08:00
end
elseif self.type == CardType.zha or self.type == CardType.zhaAndThreee then
cardType = 4
if self.type == CardType.zha then
only = 1
end
end
2025-05-13 10:30:27 +08:00
return cardType, only, longLength
2025-05-10 15:38:54 +08:00
end
2025-05-13 10:30:27 +08:00
function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
print("lingmengCheckOutCardGetTouchSet", cardType, longLength, self.lastMinCard)
2025-05-10 15:38:54 +08:00
pt(cardSet)
pt(cardMap)
local tempLong = 0
local lastCard = 0
local tempCardSet = {}
local tipCardSet = {}
2025-09-27 17:59:31 +08:00
local ZhaCardList = {}
2025-05-10 15:38:54 +08:00
for i = 1, #cardSet do
local card = cardSet[i]
2025-09-27 17:59:31 +08:00
if cardMap[card].value >= cardType and card > self.lastMinCard and cardMap[card].value ~= 4 then
2025-05-10 15:38:54 +08:00
if tempLong == 0 then
tempLong = 1
else
if lastCard - card == -1 then
tempLong = tempLong + 1
else
if tempLong >= longLength then
2025-05-13 10:30:27 +08:00
for j = 1, tempLong do
table.insert(self.touchCardSet, tempCardSet[j])
2025-05-10 15:38:54 +08:00
self.touchCardMao[tempCardSet[j]] = 1
end
end
2025-05-13 10:30:27 +08:00
table.insert(tipCardSet, tempCardSet)
2025-05-10 15:38:54 +08:00
tempLong = 1
tempCardSet = {}
end
end
2025-05-13 10:30:27 +08:00
table.insert(tempCardSet, card)
2025-05-10 15:38:54 +08:00
lastCard = card
end
2025-05-13 10:30:27 +08:00
if cardMap[card].value == 4 then
table.insert(self.touchCardSet, card)
self.touchCardMao[card] = 1
2025-09-27 17:59:31 +08:00
table.insert(ZhaCardList, card)
2025-05-13 10:30:27 +08:00
end
2025-05-10 15:38:54 +08:00
end
if tempLong >= longLength then
2025-05-13 10:30:27 +08:00
for j = 1, tempLong do
table.insert(self.touchCardSet, tempCardSet[j])
2025-05-10 15:38:54 +08:00
self.touchCardMao[tempCardSet[j]] = 1
end
end
2025-05-13 10:30:27 +08:00
table.insert(tipCardSet, tempCardSet)
2025-09-27 17:59:31 +08:00
for i = 1, #ZhaCardList do
table.insert(tipCardSet, ZhaCardList[i])
end
2025-05-10 15:38:54 +08:00
return tipCardSet
end
2025-05-13 10:30:27 +08:00
function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
print("lingmengCheckOutCardSetTipList", longLength, cardMap, cardType)
2025-05-10 15:38:54 +08:00
pt(tipCardSet)
for i = 1, #tipCardSet do
2025-05-13 10:30:27 +08:00
if type(tipCardSet[i]) == 'number' then
table.insert(self.tipCardList, cardMap[tipCardSet[i]].cardList)
2025-05-10 15:38:54 +08:00
else
2025-05-13 10:30:27 +08:00
local tipCardSetLen = #tipCardSet[i]
if tipCardSetLen == longLength then
local tempList = {}
for j = 1, tipCardSetLen do
local card = tipCardSet[i][j]
local minNum = Mathf.Min(cardMap[card].value, cardType)
for k = 1, minNum do
table.insert(tempList, cardMap[card].cardList[k])
end
end
table.insert(self.tipCardList, tempList)
else
for j = 1, tipCardSetLen do
if j + longLength - 1 <= tipCardSetLen then
local tempList = {}
for k = j, j + longLength - 1 do
local card = tipCardSet[i][k]
local minNum = Mathf.Min(cardMap[card].value, cardType)
for l = 1, minNum do
table.insert(tempList, cardMap[card].cardList[l])
end
2025-05-10 15:38:54 +08:00
end
2025-05-13 10:30:27 +08:00
table.insert(self.tipCardList, tempList)
2025-05-10 15:38:54 +08:00
end
end
end
end
end
end
2025-05-08 14:57:15 +08:00
function M:CheckAloneOrLong()
2025-05-10 15:38:54 +08:00
if self.cardNum == 1 and M:CheckType(CardType.one) then
return CardType.one
2025-05-08 12:41:42 +08:00
end
2025-05-10 15:38:54 +08:00
if self.long and M:CheckType(CardType.long) then
return CardType.long
2025-04-29 19:34:41 +08:00
end
end
2025-05-08 14:57:15 +08:00
function M:CheckDuiZi()
2025-05-10 15:38:54 +08:00
if self.cardNum == 2 and self.cardSize == 1 and M:CheckType(CardType.dui) then
return CardType.dui
2025-04-29 19:34:41 +08:00
end
2025-05-13 10:30:27 +08:00
if self.cardNum % 2 == 0 and M:CheckType(CardType.duiLong) then
2025-04-29 19:34:41 +08:00
local last_k
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
2025-04-29 19:34:41 +08:00
if v == 2 then
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
2025-04-29 19:34:41 +08:00
end
else
return
end
end
2025-05-13 10:30:27 +08:00
return CardType.duiLong
2025-04-29 19:34:41 +08:00
end
end
2025-09-27 17:59:31 +08:00
--三带有着不同比大小极致,需要返回是哪些牌三带和最小的三带牌
2025-05-08 14:57:15 +08:00
function M:CheckSanDai()
2025-04-29 19:34:41 +08:00
--三张
2025-05-10 15:38:54 +08:00
if self.cardNum == 5 and M:CheckType(CardType.threeAndTwo) then
2025-05-09 16:56:59 +08:00
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
2025-09-27 17:59:31 +08:00
return CardType.threeAndTwo, { k }, k
2025-05-09 16:56:59 +08:00
end
end
2025-04-29 19:34:41 +08:00
end
2025-05-07 15:38:38 +08:00
if self.threelack and self.cardNum == 4 and self.cardSize == 2 and M:CheckType(CardType.lessThree) then
2025-09-27 17:59:31 +08:00
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
return CardType.lessThree, { k }, k
end
end
return CardType.lessThree
2025-04-29 19:34:41 +08:00
end
2025-05-07 15:38:38 +08:00
2025-05-10 15:38:54 +08:00
if self.threeNoBelt and self.cardNum == 3 and self.cardSize == 1 and M:CheckType(CardType.onlyThree) then
return CardType.onlyThree
end
2025-04-29 19:34:41 +08:00
2025-05-07 15:38:38 +08:00
2025-04-29 19:34:41 +08:00
--飞机
local temp_normol_feiji
if self.cardNum % 5 == 0 then
temp_normol_feiji = self.cardNum / 5
end
2025-05-10 15:38:54 +08:00
if temp_normol_feiji and M:CheckType(CardType.normolPlant) then
2025-04-29 19:34:41 +08:00
local last_k
2025-09-27 17:59:31 +08:00
local key_table = {}
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
2025-04-29 19:34:41 +08:00
if v >= 3 then
2025-09-27 17:59:31 +08:00
table.insert(key_table, k)
2025-04-29 19:34:41 +08:00
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
2025-04-29 19:34:41 +08:00
end
end
end
2025-09-27 17:59:31 +08:00
if #key_table >= temp_normol_feiji then
return CardType.normolPlant, key_table, key_table[1]
2025-04-29 19:34:41 +08:00
else
return
end
end
2025-05-07 15:38:38 +08:00
print("liengmengCheckthreelack", self.threelack, self._flag_allCards)
if self.threelack and M:CheckType(CardType.lessPlant) then
2025-04-29 19:34:41 +08:00
local last_k
2025-09-27 17:59:31 +08:00
local key_table = {}
2025-05-14 17:28:56 +08:00
local num_four = 0
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
2025-05-07 15:38:38 +08:00
if v >= 3 then
2025-05-14 17:28:56 +08:00
if v == 4 then
num_four = 1
end
2025-09-27 17:59:31 +08:00
table.insert(key_table, k)
2025-05-07 15:38:38 +08:00
print("liengmengCheckthreelack2", last_k, k)
2025-04-29 19:34:41 +08:00
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
2025-04-29 19:34:41 +08:00
end
end
end
2025-09-27 17:59:31 +08:00
print("liengmengCheckthreelack4", #key_table, self.cardNum - #key_table * 3 < #key_table * 2)
2025-05-07 15:38:38 +08:00
2025-09-27 17:59:31 +08:00
if self.cardNum - #key_table * 3 < #key_table * 2 and not (self.cardNum == 4 and num_four == 1) then
return CardType.lessPlant, key_table, key_table[1]
2025-05-07 15:38:38 +08:00
else
return
end
2025-04-29 19:34:41 +08:00
end
2025-05-07 15:38:38 +08:00
print("liengmengCheckplaneNoBelt", self.planeNoBelt, self.cardNum % 3)
2025-05-10 15:38:54 +08:00
if self.planeNoBelt and self.cardNum % 3 == 0 and M:CheckType(CardType.onlyPlant) then
local last_k
2025-05-07 15:38:38 +08:00
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 3 then
if not last_k then
last_k = k
else
if math.abs(last_k - k) ~= 1 then
return
end
2025-05-07 15:38:38 +08:00
last_k = k
end
2025-05-07 15:38:38 +08:00
else
return
end
end
2025-05-10 15:38:54 +08:00
return CardType.onlyPlant
end
2025-04-29 19:34:41 +08:00
end
2025-05-08 14:57:15 +08:00
function M:CheckZha()
2025-04-29 19:34:41 +08:00
if self.cardNum == 4 and self.cardSize == 1 then
2025-05-10 15:38:54 +08:00
return CardType.zha
2025-04-29 19:34:41 +08:00
end
2025-05-10 15:38:54 +08:00
if self.fourDaiThree and self.cardNum == 7 and M:CheckType(CardType.zhaAndThreee) then
2025-04-29 19:34:41 +08:00
local flag_four
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
2025-04-29 19:34:41 +08:00
if v == 4 then
2025-09-27 17:59:31 +08:00
return CardType.zhaAndThreee, { k }, k
2025-04-29 19:34:41 +08:00
end
end
2025-05-13 10:30:27 +08:00
return
2025-04-29 19:34:41 +08:00
end
end
2025-05-08 14:57:15 +08:00
function M:CheckType(type)
2025-05-13 11:23:29 +08:00
if type == CardType.duiLong then
return self._flag_checkLst or self._flag_fristCard or (type == self.type and self.cardNum == self.lastCardNum)
elseif type == CardType.lessPlant or type == CardType.lessThree then
return self._flag_checkLst or (self._flag_fristCard and self._flag_allCards) or type == self.type
2025-05-13 11:23:29 +08:00
else
return self._flag_checkLst or self._flag_fristCard or type == self.type
end
2025-05-08 14:57:15 +08:00
end
2025-05-10 15:38:54 +08:00
function M:GetTipsList()
return self.tipCardList
end
function M:GetTouchSet()
return self.touchCardSet
end
function M:GetTouchCardMap()
return self.touchCardMao
end
2025-04-29 19:34:41 +08:00
function M:Clear()
self.cardList = {}
self.cardListSord = {}
2025-04-29 19:34:41 +08:00
self.cardNum = 0
self.cardSize = 0
self.long = false
2025-05-08 14:57:15 +08:00
self._flag_checkLst = false
2025-04-29 19:34:41 +08:00
end
return M