diff --git a/solitaire.lua b/solitaire.lua index 93d8932..a0dd2a3 100644 --- a/solitaire.lua +++ b/solitaire.lua @@ -41,6 +41,7 @@ stacks={} c_hover=nil hand=nil locations={} +debug=false function create_deck() local cards={} @@ -81,10 +82,25 @@ end function BOOT() stacks={ - create_deck(), {}, -- deck, pile + {}, {}, -- deck, pile {}, {}, {}, {}, -- 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]) table.insert(locations,{1,2,2}) -- Set up stacks