From 9ab62214628d380d9edb2cd5fd09bdaadb83ff49 Mon Sep 17 00:00:00 2001 From: geemili Date: Mon, 12 Feb 2024 12:09:16 -0700 Subject: [PATCH] feat: debug mode --- solitaire.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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