Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
b8ffd54a
Commit
b8ffd54a
authored
Jan 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean
parent
323d39f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
2pick/pick.lua
2pick/pick.lua
+5
-5
No files found.
2pick/pick.lua
View file @
b8ffd54a
...
...
@@ -26,7 +26,6 @@ function Auxiliary.SplitData(inputstr)
return
t
end
function
Auxiliary
.
LoadDB
(
p
,
pool
)
os.execute
(
"sqlite3 2pick/card_pools/"
..
pool
..
"/card_pool.cdb < 2pick/card_pools/"
..
pool
..
"/sqlite_cmd.txt"
)
for
line
in
io.lines
(
"card_list_"
..
pool
..
".txt"
)
do
local
data
=
Auxiliary
.
SplitData
(
line
)
local
code
=
data
[
1
]
...
...
@@ -58,14 +57,15 @@ function Auxiliary.LoadDB(p,pool)
end
--to do: multi card pools
function
Auxiliary
.
LoadCardPools
()
local
pool
s
=
{}
local
pool
_list
=
{}
local
file
=
io.popen
(
"ls 2pick/card_pools"
)
for
dirname
in
file
:
lines
()
do
table.insert
(
pools
,
dirname
)
for
pool
in
file
:
lines
()
do
table.insert
(
pool_list
,
pool
)
os.execute
(
"sqlite3 2pick/card_pools/"
..
pool
..
"/card_pool.cdb < 2pick/card_pools/"
..
pool
..
"/sqlite_cmd.txt"
)
end
file
:
close
()
for
p
=
0
,
1
do
Auxiliary
.
LoadDB
(
p
,
pool
s
[
math.random
(
#
pools
)])
Auxiliary
.
LoadDB
(
p
,
pool
_list
[
math.random
(
#
pools
)])
end
end
...
...
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