Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
no81cards
Commits
50f8f15a
Commit
50f8f15a
authored
Oct 11, 2021
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tama.lua
parent
94462e90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
expansions/script/tama.lua
expansions/script/tama.lua
+16
-1
No files found.
expansions/script/tama.lua
View file @
50f8f15a
...
...
@@ -349,7 +349,7 @@ function tama.tamas_selectElementsForEqual(c,mg,sg,codes)
sg
:
RemoveCard
(
c
)
return
res
end
--target:2A,2B,storage:(A+B)*2,3A*1,3B*1,final:
(A+B)*2 or 3A+3B
--target:2A,2B,storage:(A+B)*2,3A*1,3B*1,final:
true
function
tama
.
tamas_selectElementsForAbove
(
c
,
mg
,
sg
,
codes
)
local
targetCodes
=
tama
.
DeepCopy
(
codes
)
sg
:
AddCard
(
c
)
...
...
@@ -498,22 +498,37 @@ function tama.tamas_elementsSelectFilterForAbove(c,mg,sg,codes,allSelect,selecte
tama
.
tamas_addElementsGroupToTable
(
allSelect
,
sg
,
selectedElements2
)
else
local
tc
=
mg
:
GetFirst
()
--[[
while tc do
tama.tamas_elementsSelectFilterForAbove(tc,mg:Clone(),sg,targetCodes1,allSelect,selectedElements2)
tc=mg:GetNext()
end
]]
while
tc
do
tama
.
tamas_elementsSelectFilterForAbove
(
tc
,
mg
:
Clone
(),
sg
,
targetCodes1
,
allSelect
,
selectedElements2
)
mg
:
RemoveCard
(
tc
)
tc
=
mg
:
GetFirst
()
end
end
end
elseif
mg
:
GetCount
()
>
0
then
local
tc
=
mg
:
GetFirst
()
--[[
while tc do
tama.tamas_elementsSelectFilterForAbove(tc,mg:Clone(),sg,targetCodes,allSelect,selectedElements1)
tc=mg:GetNext()
end
]]
while
tc
do
tama
.
tamas_elementsSelectFilterForAbove
(
tc
,
mg
:
Clone
(),
sg
,
targetCodes
,
allSelect
,
selectedElements1
)
mg
:
RemoveCard
(
tc
)
tc
=
mg
:
GetFirst
()
end
end
if
c
~=
nil
then
sg
:
RemoveCard
(
c
)
end
return
#
allSelect
>
0
end
--target:2A,2B,storage:(A+B)*2,3A*1,3B*1,final:(A+B)*2 or 3A+3B
function
tama
.
tamas_getAllSelectForAbove
(
mg
,
codes
)
local
targetCodes
=
tama
.
DeepCopy
(
codes
)
local
allSelect
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment