Commit 2493a50a authored by zengsxing's avatar zengsxing

Update c101301069.lua

修改为运算符的写法
parent ed84a182
...@@ -40,8 +40,8 @@ function s.SelectSub(g1,g2,tp) ...@@ -40,8 +40,8 @@ function s.SelectSub(g1,g2,tp)
local max=math.min(#g1,#g2) local max=math.min(#g1,#g2)
local sg1=Group.CreateGroup() local sg1=Group.CreateGroup()
local sg2=Group.CreateGroup() local sg2=Group.CreateGroup()
local sg=sg1:__add(sg2) local sg=sg1+sg2
local fg=g1:__add(g2) local fg=g1+g2
local finish=false local finish=false
while true do while true do
finish=#sg1==#sg2 and #sg>0 finish=#sg1==#sg2 and #sg>0
...@@ -60,13 +60,13 @@ function s.SelectSub(g1,g2,tp) ...@@ -60,13 +60,13 @@ function s.SelectSub(g1,g2,tp)
sg2:AddCard(sc) sg2:AddCard(sc)
end end
end end
sg=sg1:__add(sg2) sg=sg1+sg2
fg=g1:__add(g2):Filter(aux.TRUE,sg) fg=g1+g2-sg
if #sg1>=max then if #sg1>=max then
fg=fg:Filter(aux.TRUE,g1) fg=fg-g1
end end
if #sg2>=max then if #sg2>=max then
fg=fg:Filter(aux.TRUE,g2) fg=fg-g2
end end
end end
return sg return sg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment