跑得快出牌弹出
parent
a21fe0cd4f
commit
48e7d6457f
|
|
@ -133,16 +133,15 @@ function M:CheckSanDai()
|
||||||
if self.threeNoBelt and self.cardNum == 3 and self.cardSize == 1 then
|
if self.threeNoBelt and self.cardNum == 3 and self.cardSize == 1 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if self.threelack and self.cardNum == 4 and self.cardSize == 2 then
|
-- if self.threelack and self.cardNum == 4 and self.cardSize == 2 then
|
||||||
return true
|
-- return true
|
||||||
end
|
-- end
|
||||||
|
|
||||||
--飞机
|
--飞机
|
||||||
local temp_normol_feiji
|
local temp_normol_feiji
|
||||||
if self.cardNum % 5 == 0 then
|
if self.cardNum % 5 == 0 then
|
||||||
temp_normol_feiji = self.cardNum / 5
|
temp_normol_feiji = self.cardNum / 5
|
||||||
end
|
end
|
||||||
print("lingmengCheckSanDaiqian", self.cardNum % 5, self.cardNum / 5, temp_normol_feiji)
|
|
||||||
|
|
||||||
if temp_normol_feiji then
|
if temp_normol_feiji then
|
||||||
local last_k
|
local last_k
|
||||||
|
|
@ -159,7 +158,6 @@ function M:CheckSanDai()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print("lingmengCheckSanDai", num_san, temp_normol_feiji)
|
|
||||||
if num_san == temp_normol_feiji then
|
if num_san == temp_normol_feiji then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
|
|
@ -167,13 +165,16 @@ function M:CheckSanDai()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("liengmengCheckSanDai", self.planeNoBelt, self.cardNum)
|
||||||
if self.planeNoBelt and self.cardNum % 3 == 0 then
|
if self.planeNoBelt and self.cardNum % 3 == 0 then
|
||||||
local last_k
|
local last_k
|
||||||
for k, v in pairs(self.cardList) do
|
for k, v in pairs(self.cardList) do
|
||||||
if v == 3 then
|
if v == 3 then
|
||||||
|
print("liengmengCheckSanDai2")
|
||||||
if not last_k then
|
if not last_k then
|
||||||
last_k = k
|
last_k = k
|
||||||
else
|
else
|
||||||
|
print("liengmengCheckSanDai3", last_k, k)
|
||||||
if math.abs(last_k - k) ~= 1 then
|
if math.abs(last_k - k) ~= 1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
@ -185,27 +186,27 @@ function M:CheckSanDai()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.threelack then
|
-- if self.threelack then
|
||||||
local last_k
|
-- local last_k
|
||||||
local num_san = 0
|
-- local num_san = 0
|
||||||
for k, v in pairs(self.cardList) do
|
-- for k, v in pairs(self.cardList) do
|
||||||
if v >= 3 then
|
-- if v >= 3 then
|
||||||
num_san = num_san + 1
|
-- num_san = num_san + 1
|
||||||
if not last_k then
|
-- if not last_k then
|
||||||
last_k = k
|
-- last_k = k
|
||||||
else
|
-- else
|
||||||
if math.abs(last_k - k) ~= 1 then
|
-- if math.abs(last_k - k) ~= 1 then
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
if self.cardNum - num_san * 3 < num_san * 2 then
|
-- if self.cardNum - num_san * 3 < num_san * 2 then
|
||||||
return true
|
-- return true
|
||||||
else
|
-- else
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:CheckZha()
|
function M:CheckZha()
|
||||||
|
|
@ -229,11 +230,6 @@ function M:Clear()
|
||||||
self.cardNum = 0
|
self.cardNum = 0
|
||||||
self.cardSize = 0
|
self.cardSize = 0
|
||||||
self.long = false
|
self.long = false
|
||||||
self.planeNoBelt = false
|
|
||||||
self.threeNoBelt = false
|
|
||||||
self.planelack = false
|
|
||||||
self.threelack = false
|
|
||||||
self.fourDaiThree = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue