feat: debug mode

main
LeRoyce Pearson 2024-02-12 12:09:16 -07:00
parent 671d1410d5
commit 9ab6221462
1 changed files with 17 additions and 1 deletions

View File

@ -41,6 +41,7 @@ stacks={}
c_hover=nil c_hover=nil
hand=nil hand=nil
locations={} locations={}
debug=false
function create_deck() function create_deck()
local cards={} local cards={}
@ -81,10 +82,25 @@ end
function BOOT() function BOOT()
stacks={ stacks={
create_deck(), {}, -- deck, pile {}, {}, -- deck, pile
{}, {}, {}, {}, -- finished {}, {}, {}, {}, -- finished
{}, {}, {}, {}, {}, {}, {} {}, {}, {}, {}, {}, {}, {}
} }
if debug then
for i=13,1,-1 do
for a=1,4 do
table.insert(stacks[7+a], {
x=0,y=0,state=0,
rank=i,
suit=a
})
end
end
return
end
stacks[1] = create_deck()
shuffle(stacks[1]) shuffle(stacks[1])
table.insert(locations,{1,2,2}) table.insert(locations,{1,2,2})
-- Set up stacks -- Set up stacks