diff --git a/solitaire.lua b/solitaire.lua index 0b49270..a214389 100644 --- a/solitaire.lua +++ b/solitaire.lua @@ -318,8 +318,16 @@ function update() if is_clearing then hand=nil local clear_count=0 - for a=7,13 do - for i=3,6 do + for i=3,6 do + if #stacks[1]~=0 and move_sel({1,#stacks[1]}, {i,#stacks[i]}) then + clear_count=clear_count+1 + break + end + if #stacks[2]~=0 and move_sel({2,#stacks[2]}, {i,#stacks[i]}) then + clear_count=clear_count+1 + break + end + for a=7,13 do if #stacks[a]==0 then break end if move_sel({a,#stacks[a]}, {i,#stacks[i]}) then clear_count=clear_count+1