Compare commits

..

7 Commits

Author SHA1 Message Date
2507a3f218 Final tutorial improvements 2024-02-14 18:17:19 -08:00
89dcee996f Add better cover 2024-02-14 18:03:31 -08:00
55eb61825e Add a tips page 2024-02-14 17:51:57 -08:00
184ce112bd Fix a crash 2024-02-14 17:32:27 -08:00
c2a978e315 Grabbed cards float 2024-02-14 16:29:49 -08:00
93161c6465 Stacked moves 2024-02-14 15:55:00 -08:00
7f87814d35 Remove unused code 2024-02-14 14:10:19 -08:00
14 changed files with 276 additions and 254 deletions

View File

@ -129,6 +129,7 @@ function board:find_automove()
if w<=self.ruleset.n_suits and self.slots[self.ruleset.n_slots+1]:peek()!=nil then if w<=self.ruleset.n_suits and self.slots[self.ruleset.n_slots+1]:peek()!=nil then
-- the top wells are blocked -- the top wells are blocked
elseif self.wells[w]:would_accept(top) then elseif self.wells[w]:would_accept(top) then
self.cursor:drop_grab_silent()
self:animate_and_move_to_well(s,w) self:animate_and_move_to_well(s,w)
self.last_card=top self.last_card=top
@ -174,13 +175,16 @@ function board:draw()
end end
end end
local grabs={}
for s_ix in all(self.cursor.grabbed_slots) do
grabs[s_ix]=(grabs[s_ix] or 0)+1
end
local function forall_slots(cb) local function forall_slots(cb)
for s_ix=1,#self.slots do for s_ix=1,#self.slots do
local s=self.slots[s_ix] local s=self.slots[s_ix]
local l=self.ruleset.layouts:slot(s_ix) local l=self.ruleset.layouts:slot(s_ix)
local n=#s.contents local n=#s.contents-(grabs[s_ix] or 0)
if (self.cursor.grabbed==s_ix) n-=1
cb(x,y,s_ix,s,l,n) cb(x,y,s_ix,s,l,n)
end end
@ -233,8 +237,8 @@ end
function slot:add(card) function slot:add(card)
add(self.contents,card) add(self.contents,card)
end end
function slot:peek() function slot:peek(depth)
return self.contents[#self.contents] return self.contents[#self.contents-(depth or 0)]
end end
function slot:pop() function slot:pop()
return deli(self.contents,#self.contents) return deli(self.contents,#self.contents)

View File

@ -36,5 +36,5 @@ function checkpoint:apply(board)
add(board.wells[w].contents,i) add(board.wells[w].contents,i)
end end
end end
board.cursor.grabbed=nil board.cursor:drop_grab()
end end

BIN
cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -11,16 +11,17 @@ function cursor:init(board)
self.hover_x=self.ruleset.n_slots\2 self.hover_x=self.ruleset.n_slots\2
self.hover_y=1 self.hover_y=1
self.saved_hover_x_y=nil self.saved_hover_x_y=nil
self.grabbed=nil self.grabbed_slots={}
end end
function cursor:acceptance_state() function cursor:acceptance_state()
local hover=self:hover_slot() local hover=self:hover_slot()
if self.grabbed then local slot=self:grabbed_slot()
if hover==self.grabbed then if slot then
if hover==slot then
return acceptance_state.no_move return acceptance_state.no_move
end end
local source=self.board.slots[self.grabbed] local source=self.board.slots[slot]
local target=self.board.slots[self:hover_slot()] local target=self.board.slots[self:hover_slot()]
local card=source:peek() local card=source:peek()
if target:would_accept(card) then if target:would_accept(card) then
@ -38,13 +39,16 @@ function cursor:save_hover()
self.saved_hover_x_y={self.hover_x,self.hover_y} self.saved_hover_x_y={self.hover_x,self.hover_y}
end end
--[[
function cursor:restore_hover() function cursor:restore_hover()
self.wants_to_restore_hover=true self.wants_to_restore_hover=true
end end
]]
--[[
function cursor:actually_restore_hover() function cursor:actually_restore_hover()
if (not self.saved_hover_x_y) return if (not self.saved_hover_x_y) return
self.wants_to_restore_hover=false -- self.wants_to_restore_hover=false
-- try restoring hover x -- try restoring hover x
local old_hover_x,old_hover_y=self.hover_x,self.hover_y local old_hover_x,old_hover_y=self.hover_x,self.hover_y
@ -62,23 +66,27 @@ function cursor:actually_restore_hover()
i() i()
end end
end end
]]--
function cursor:toggle_grab() function cursor:toggle_grab()
local acc,src,tar=self:acceptance_state() local acc,src,tar=self:acceptance_state()
local slot=self:hover_slot() local slot=self:hover_slot()
if acc==acceptance_state.not_grabbed then if acc==acceptance_state.not_grabbed then
if (not self.board.watcher:intercept("grab",slot)) sounds:dire() return if (not self.board.watcher:intercept("grab",slot)) sounds:dire() return
if (self.board.slots[slot]:peek()) self.grabbed=slot if (self.board.slots[slot]:peek()) self.grabbed_slots={slot}
self:save_hover() self:save_hover()
sounds:menu() sounds:menu()
elseif acc==acceptance_state.would_accept then elseif acc==acceptance_state.would_accept then
if (not self.board.watcher:intercept("drop",slot)) sounds:dire() return if (not self.board.watcher:intercept("drop",slot)) sounds:dire() return
self.board:pre_move(src:peek()) self.board:pre_move(src:peek())
local card=src:pop() while self:acceptance_state() == acceptance_state.would_accept do
tar:add(card) local card=src:pop()
self.grabbed=nil tar:add(card)
self.board:on_move(card) deli(self.grabbed_slots)
self:restore_hover() end
self.grabbed_slots={}
self.board:on_move()
-- if (#self.grabbed_slots == 0) self:restore_hover()
sounds:menu() sounds:menu()
elseif acc==acceptance_state.no_move or acc==acceptance_state.would_not_accept then elseif acc==acceptance_state.no_move or acc==acceptance_state.would_not_accept then
self:drop_grab() self:drop_grab()
@ -87,15 +95,30 @@ function cursor:toggle_grab()
end end
end end
function cursor:incr_grab()
local slot=self:hover_slot()
if (slot!=self:grabbed_slot()) return
if (not self.board.watcher:intercept("incr_grab",slot)) sounds:dire() return
local new_card = self.board.slots[slot]:peek(#self.grabbed_slots)
if (not new_card) return
local old_card = self.board.slots[slot]:peek(#self.grabbed_slots-1)
if (not self:_can_incr_grab(old_card,new_card)) return
add(self.grabbed_slots,slot)
sounds:menu()
end
function cursor:drop_grab_silent()
self.grabbed_slots={}
end
function cursor:drop_grab() function cursor:drop_grab()
if (not self.board.watcher:intercept("cancel")) sounds:dire() return if (not self.board.watcher:intercept("cancel")) sounds:dire() return
self.grabbed=nil self.grabbed_slots={}
self:restore_hover() -- self:restore_hover()
sounds:menu() sounds:menu()
end end
function cursor:update() function cursor:update()
if (self.wants_to_restore_hover) self:actually_restore_hover() -- if (self.wants_to_restore_hover) self:actually_restore_hover()
end end
function cursor:move_x(dx) function cursor:move_x(dx)
@ -114,7 +137,7 @@ end
function cursor:move_y(dy) function cursor:move_y(dy)
local old_y=self.hover_y local old_y=self.hover_y
if (self.hover_y==0 and dy==1) self.hover_y=1 if (self.hover_y==0 and dy==1) self.hover_y=1
if (self.hover_y==1 and dy==-1) self.hover_y=0 if (self.hover_y==1 and dy==-1 and #self.grabbed_slots<2) self.hover_y=0
if (self:acceptance_state()==acceptance_state.would_not_accept) if (not self:move_x(-1)) self.hover_y=old_y if (self:acceptance_state()==acceptance_state.would_not_accept) if (not self:move_x(-1)) self.hover_y=old_y
end end
@ -123,27 +146,42 @@ function cursor:hover_slot()
return self.hover_x+1 return self.hover_x+1
end end
function cursor:grabbed_slot()
return self.grabbed_slots[#self.grabbed_slots]
end
function cursor:grabbed_card() function cursor:grabbed_card()
if self.grabbed then local grabbed_slot=self:grabbed_slot()
local slot=self.board.slots[self.grabbed] if grabbed_slot then
return slot:peek() return self.board.slots[grabbed_slot]:peek()
end end
return nil
end end
function cursor:draw_at(l,i) function cursor:draw_at(l,i)
local card=self:grabbed_card() local slot=self:grabbed_slot()
local acc=self:acceptance_state()
if card then if not slot then
i+=1
local x,y=l:place_card(i)
local card_fg=self.ruleset.deck:draw_card(x,y,card,{rotate=l.rotated})
local fg=card_fg
draw_layout_hint(l,i,9,false)
else
local filled=false local filled=false
if (i<1) i=1 filled=true if (i<1) i=1 filled=true
draw_layout_hint(l,i,12,filled) draw_layout_hint(l,i,12,filled)
return
end end
local not_moving=self:acceptance_state()==acceptance_state.no_move
for i2=1,#self.grabbed_slots do
local ix=i2-1
if (not_moving) ix=#self.grabbed_slots-i2
local card=self.board.slots[slot]:peek(ix)
local x,y=l:place_card(i+i2+1)
local card_fg=self.ruleset.deck:draw_card(x,y,card,{rotate=l.rotated})
local fg=card_fg
if (i2==1) draw_layout_hint(l,i+i2+1,9,false)
end
end
function cursor:_can_incr_grab(c0,c1)
c0=self.board.ruleset.deck.cards[c0]
c1=self.board.ruleset.deck.cards[c1]
if (c0.suit!=c1.suit) return false
return c0.rank==c1.rank+1 or c1.rank==c0.rank+1
end end

View File

@ -32,39 +32,6 @@ function klass()
return k return k
end end
function alives(tbl)
local tbl2={}
for i in all(tbl) do
if (not i.dead) add(tbl2,i)
end
return tbl2
end
function trunc4(x)
if (x < 0) return -trunc4(-x)
return x\0.25/4
end
function stepstep(by,x0,x1,f)
local x=x0
if (x==x1) return
if x0>x1 then
return stepstep(by,-x0,-x1,function(x) return f(-x) end)
end
x=x\by*by
while true do
x+=by
if (x>=x1) f(x1) break
if (not f(x)) break
end
end
function lerp(x,x0,x1)
return x0+x*(x1-x0)
end
function gsv(s) function gsv(s)
local ret=split(s,"\n") local ret=split(s,"\n")
for i,v in ipairs(ret) do for i,v in ipairs(ret) do

263
main.p8
View File

@ -31,19 +31,12 @@ __lua__
#include state_gameround.lua #include state_gameround.lua
#include state_ironman.lua #include state_ironman.lua
#include state_reset_menu.lua #include state_reset_menu.lua
#include state_restartmenu.lua
#include state_wonironman.lua #include state_wonironman.lua
#include state_wonround.lua #include state_wonround.lua
#include tutorial.lua #include tutorial.lua
#include text.lua #include text.lua
#include watcher.lua #include watcher.lua
#include main.lua #include main.lua
--[[
srand(2)
for i=1,10 do
print(tostr(rnd(),2))
end
stop()]]
__gfx__ __gfx__
0000000000000000000000000000000077777000000000000000000000000000000000000000000000000000000000000000000000000000ddddddddddddd000 0000000000000000000000000000000077777000000000000000000000000000000000000000000000000000000000000000000000000000ddddddddddddd000
0000000000700000077700000007000070007000070707000000000000000000000000000000000000000000000000000000000000000000d31231231231d000 0000000000700000077700000007000070007000070707000000000000000000000000000000000000000000000000000000000000000000d31231231231d000
@ -174,134 +167,134 @@ fa1da3a42c14300b02d04505c8f103471874735968bb1cd203743347342fd27240c1b61350475064
041497c80550a4701604144259018e4314582680b0bb8a28b4061216010d3063521c666031d4460d1412012e2547030e2389252b19e9da341623912035220923 041497c80550a4701604144259018e4314582680b0bb8a28b4061216010d3063521c666031d4460d1412012e2547030e2389252b19e9da341623912035220923
220d61f5d10673575950d15619fb7355715a214d604411ab425c28017fa0069204b0663402432027a2205515603021b5012178664215329112a53b219206035f 220d61f5d10673575950d15619fb7355715a214d604411ab425c28017fa0069204b0663402432027a2205515603021b5012178664215329112a53b219206035f
__label__ __label__
11111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt11111111 5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111 5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
1111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t111111 55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111 55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111 gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
tt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttt gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
ttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1ttttttttt gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
ttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11111111tttttttttt gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
tttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11t gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
tttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tt 55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
tttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tt 55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
tttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tt 5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
tttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttt 5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
ttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt11111111ttttt 5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
ttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11111111tttttt 5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
tttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttt 555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
tttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11t 555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
tttttttt1111111111111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111t 55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111 55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
tttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111t gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
tttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tt gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
tttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111111111111ttt gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
tttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttt gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tttttttttttttttt1111111111111ttttt gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
11111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt1 gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11 gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
1111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt111111111111111t111 gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111 gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111 gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
1111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt111111111111111111111111 gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
ttt11111111tttttttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t1111111111111111tttttt gggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555
tt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttt gggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555
t11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111111111111tttt1tt gggggg5555555555555555gg55555555555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gg
11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt gggggg5555555555555555gg55555555555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gg
1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt gggggg555555555555555555555555555555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggg
111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1 gggggg555555555555555555555555555555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggg
111111tt1111111ttttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1 gggggg5555555555555555555555555555gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggg
111111t1111111tttttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11 gggggg5555555555555555555555555555gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggg
1111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt11 gggggg55555555555555555555555555gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggg
111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11 gggggg55555555555555555555555555gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggg
11111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tttttttttttttttt11 gggggg555555555555555555555555gggggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg55
1111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt11 gggggg555555555555555555555555gggggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg55
111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt111 gggg555555nnnnnnnnnnnnnnnnnngggggggggg5555555555555555ggggggggggggggggggggggggggggggggggggggggggggggnnnn55555555555555gggg555555
111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt111 gggg555555nnnnnnnnnnnnnnnnnngggggggggg5555555555555555ggggggggggggggggggggggggggggggggggggggggggggggnnnn55555555555555gggg555555
1111111111111111111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt1111 gggg55555555nnnn55555555nnnnnn5555gg55555555555555gggggggggggggggggg5555ggggggggggggggggggggggggggggnnnn55555555555555gg55555555
1111111111111111111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt111111 gggg55555555nnnn55555555nnnnnn5555gg55555555555555gggggggggggggggggg5555ggggggggggggggggggggggggggggnnnn55555555555555gg55555555
11111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt11111111 gg5555555555nnnn5555555555nnnn555555nnnnnnnn5555nnnnnnnnggggnnnnnn5555nnnnnnnnggggggnnnnggnnnnnnggggnn5555nnnnnnnnnn555555555555
111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111 gg5555555555nnnn5555555555nnnn555555nnnnnnnn5555nnnnnnnnggggnnnnnn5555nnnnnnnnggggggnnnnggnnnnnnggggnn5555nnnnnnnnnn555555555555
1111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t111111 555555555555nnnn55555555nnnn555555nn555555nnnn55ggnnnngg555555nn5555nnggggggnnnnggnnnnnnnnggggnnnngggg55nnnn555555nn555555555555
111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111 555555555555nnnn55555555nnnn555555nn555555nnnn55ggnnnngg555555nn5555nnggggggnnnnggnnnnnnnnggggnnnngggg55nnnn555555nn555555555555
111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111 555555555555nnnn55nnnnnn555555555555555555nnnn5555nnnn55555555nn55nnnnggggggnnnnggggnnnnggggggnnnngggg55nnnn55555555555555555555
11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt 555555555555nnnn55nnnnnn555555555555555555nnnn5555nnnn55555555nn55nnnnggggggnnnnggggnnnnggggggnnnngggg55nnnn55555555555555555555
tt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttt 555555555555nnnn5555nnnn5555555555ggnnnnnnnnnn555555nnnn5555nn5555nnnnnnnnnnnnnnggggnnnnggggggnnnngggg55nnnnnnnn55555555555555gg
ttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1ttttttttt 555555555555nnnn5555nnnn5555555555ggnnnnnnnnnn555555nnnn5555nn5555nnnnnnnnnnnnnnggggnnnnggggggnnnngggg55nnnnnnnn55555555555555gg
ttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt11111111tttttttttt 555555555555nnnn555555nnnn5555ggggnnggggggnnnngg5555nnnn5555nn55ggnnnnggggggggggggggnnnnggggggnnnngg55555555nnnnnnnn55555555gggg
tttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11t 555555555555nnnn555555nnnn5555ggggnnggggggnnnngg5555nnnn5555nn55ggnnnnggggggggggggggnnnnggggggnnnngg55555555nnnnnnnn55555555gggg
tttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tt 555555555555nnnn55555555nnnnggggnnnnggggggnnnn55555555nn55nn55ggggnnnnggggggggggggggnnnnggggggnnnngg555555555555nnnn555555555555
tttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tt 555555555555nnnn55555555nnnnggggnnnnggggggnnnn55555555nn55nn55ggggnnnnggggggggggggggnnnnggggggnnnngg555555555555nnnn555555555555
tttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tt 555555555555nnnn5555555555nnnnggnnnn55ggnnnnnn55555555nnnnnnggggggggnnnnggggggnnggggnnnnggggggnnnn555555nn555555nnnn555555555555
tttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttt 555555555555nnnn5555555555nnnnggnnnn55ggnnnnnn55555555nnnnnnggggggggnnnnggggggnnggggnnnnggggggnnnn555555nn555555nnnn555555555555
ttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt11111111ttttt ggggggggggnnnnnnnn55555555nnnnnnggnnnnnnggnnnnnn55555555nngggggggggg55nnnnnnnnggggnnnnnnnnggggnnnnnn5555nnnnnnnnnn55555555555555
ttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11111111tttttt ggggggggggnnnnnnnn55555555nnnnnnggnnnnnnggnnnnnn55555555nngggggggggg55nnnnnnnnggggnnnnnnnnggggnnnnnn5555nnnnnnnnnn55555555555555
tttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt11111111ttttttt gggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555
tttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11t gggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555
tttttttt1111111111111111111111111111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111t ggggggggggnnnnnnnnnnnnnnnnnngggggggggggg55555555555555gggggggg555555555555ggggnnnnnngggg5555555555555555555555555555555555555555
ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111 ggggggggggnnnnnnnnnnnnnnnnnngggggggggggg55555555555555gggggggg555555555555ggggnnnnnngggg5555555555555555555555555555555555555555
tttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt1111111nnnnnnnnnt11111111ttttttttttttttttttttttttt11nn111tt1111111t ggggggggggggnnnnggggggggnnnnnngggggggggg55555555555555gggg55555555555555ggggggggnnnngg555555gg55555555555555555555555555555555gg
tttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt11111111nn1111nnn111111ttttttttt11ttttttttttttttt111nn111t1111111tt ggggggggggggnnnnggggggggnnnnnngggggggggg55555555555555gggg55555555555555ggggggggnnnngg555555gg55555555555555555555555555555555gg
tttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt111111111nn11111nn111nnnnttnnnn11nnnttnnnntttnntnnn11n11nnnnn1111ttt gggg5555ggggnnnnggggggggggnnnnggggggnnnnnnnn5555555555nnnnnnnn55555555ggnnnnnnggnnnngg55555555555555555555555555555555555555gggg
tttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt11111111111nn1111nn111n11tnnt1nn1111nttntttnntnnnnttnn111nn111n111tttt gggg5555ggggnnnnggggggggggnnnnggggggnnnnnnnn5555555555nnnnnnnn55555555ggnnnnnnggnnnngg55555555555555555555555555555555555555gggg
111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt1111111111111nn1nnn111111111nn11nn1111ntnntttnnttnntttnn111nn111111ttttt 555555ggggggnnnnggggggggnnnnggggggnnnn5555nnnn555555nnnn5555nnnn5555ggnnnnggggnnnnnngg55555555555555555555555555555555555555gggg
11111t1tttttttttttttttttttttttt1111111tttt111111ttttttt11111111111111nn11nn1tttt1nnnnn111nn11nttnnnnnnnttnntttnn111nnnn111ttttt1 555555ggggggnnnnggggggggnnnnggggggnnnn5555nnnn555555nnnn5555nnnn5555ggnnnnggggnnnnnngg55555555555555555555555555555555555555gggg
111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t11111111111nn111nnttttntt1nn111nnttnttnntttttttnntt1nn11111nnnnttttt11 555555ggggggnnnnggnnnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnnggggggggnnnngg55555555gggggggggggg5555555555555555gggggg
1111ttttttttt11ttttttttttttttt11111111t1111111tttttttt111111111111111nn11ttnnttnnt11nn1111ntntttnntttttttnntt1nn1111111nn111t111 555555ggggggnnnnggnnnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnnggggggggnnnngg55555555gggggggggggg5555555555555555gggggg
111ttttttt1111tttttttttttttttt111111111111111ttttttttt111111111111111nn11tttnntnn11nnn111tnnnttttnntttnttnnt11nn111n111nn1111111 555555ggggggnnnnggggnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnngg555555nnnngg555555gggggggggggggggggg55555555gggggggggg
111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt1111nnnnttttnnntnnn1nnn1tttnt11tttnnnnttnnnn11nnn11nnnnn11111111 555555ggggggnnnnggggnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnngg555555nnnngg555555gggggggggggggggggg55555555gggggggggg
1111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt111111111111111111111111 5555ggggggggnnnnggggggnnnnggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnn55555555nnnngg55gggggggggggggggggggggggggggggggggggggggg
1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttnnnnnnnnntt1111111tttt111111ttttttnnn1111111111111111111tttt 5555ggggggggnnnnggggggnnnnggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnn55555555nnnngg55gggggggggggggggggggggggggggggggggggggggg
ttt11111111tttttttttttttttttt111111111111ttttt11111111tttttttttttttttnnttttnnnt1111111tt1111111ttttttt1nnt1111111111111111tttttt ggggggggggggnnnnggggggggnnnnggggnnnn55555555nnnn55nnnn555555ggnnnnggnnnn55555555nnnn55gggggggggggggggggggggggggggggggggggggggggg
tt11111111ttttttttttttttttttt111111111111111t1111111ttttttttt11ttttttnntttttnn111nnnn1t111nnnntttttnnn1nn1111111111111111ttttttt ggggggggggggnnnnggggggggnnnnggggnnnn55555555nnnn55nnnn555555ggnnnnggnnnn55555555nnnn55gggggggggggggggggggggggggggggggggggggggggg
t11111111ttttttttttttttttttt11111111111111111111111ttttttt1111tttttttnnttttnnt11nn11nn111nn11nntttnnttnnn1111111111111111tttt1tt ggggggggggggnnnnggggggggggnnnnggggnnnn5555nnnn555555nnnn5555nnnn55gg55nnnn5555nnnnnngggggggggggggggg5555gggggggggggggggggggggggg
11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttnntnnnttt1nn1111nn1nn11ttnntnnttt1nn1tttttt11111111tttttttt ggggggggggggnnnnggggggggggnnnnggggnnnn5555nnnn555555nnnn5555nnnn55gg55nnnn5555nnnnnngggggggggggggggg5555gggggggggggggggggggggggg
1111111ttttt111ttttttttt1111111111111111111111111111tt11111111tttttttnnttnnttt1nn1111nn1nn1tttnn1nnttt1nnttttttttt1111tttttttttt ggggggggggnnnnnnnnggggggggnnnnnngg55nnnnnnnn5555555555nnnnnnnn5555555555nnnnnn55nnnnnngggggggg55555555gggggggggggggggggggggggggg
111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttnntttnntt1nn1111nn1nnttttnn1nn11t1nntttttttttttttttttttttt1 ggggggggggnnnnnnnnggggggggnnnnnngg55nnnnnnnn5555555555nnnnnnnn5555555555nnnnnn55nnnnnngggggggg55555555gggggggggggggggggggggggggg
111111tt1111111ttttttt111t1111111111111111ttttttttt11111111ttttttttttnnttttnn11nn1111nn1nnttttnn1nn111tnntttttttttttttttttttttt1 gggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555555555gggggggggggggggggggggggggg
111111t1111111tttttttt1111111111111111111ttttttttt11111111tttttttttttnntttttnn11nn11nn111nn1tnn111nnttnnntttt11ttttttttttttttt11 gggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555555555gggggggggggggggggggggggggg
1111111111111ttttttttt1111111111111111111tttt1ttt11111111tttttttttttnnnnttttnnn11nnnn11111nnnn11111nnntnnn1111tttttttttttttttt11 gg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555555555gggggggggggggggggggggggggg
111111111111tttttttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11 gg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555555555gggggggggggggggggggggggggg
11111111111ttttt111ttt111ttttttttt1111tttttttttt1111111ttttt111tttttnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn1 5555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg55555555555555555555555555gggggggggggggggggggggggggggg
1111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt11 5555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg55555555555555555555555555gggggggggggggggggggggggggggg
111111111ttttt11111111ttttttttttttttttttttttttt1111111tt1111111tttttlllllllllllllllllllllllllllllllllllllllllllllllllllllllllll1 55555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggg
111111111111t1111111ttttttttt11ttttttttttttttt11111111t1111111ttttttlnnnlnlnllnnlnnnlnlnlnnnlnnnlnnnlllllllllllllllllllllllllll1 55555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggg
1111111111111111111ttttttt1111tttttttttttttttt111111111111111ttnnnttlnlllnlnlnlllnlnlnlnlnlnllnllnlllllllllllllllllllllllllllll1 555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggg
1111111111111111111tttt1111111tttttttttttttttt11111111111111ttttnnntlnnlllnllnlllnnnlnlnlnnnllnllnnllllllllllllllllllllllllllll1 555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggg
11111111111111111111tt11111111tttttttttttttttt1111111111111ttttnnn1tlnlllnlnlnlllnlnlnnnlnlnllnllnlllllllllllllllllllllllllllll1 5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt11111lnnnlnlnllnnlnlnllnllnlnllnllnnnlllllllllllllllllllllllllll1 5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
1111111111ttttttttt11111111tttttttttttttttttt111111111111ttttt111111lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll1 55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
111111111ttttttttt11111111ttttttttttttttttttt111111111111111t1111111lnnnlnnnllnnlnlnlnnnlnnnllnnlnllllnnllnnlnlnlllllllllllllll1 55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
111111111tttt1ttt11111111ttttttttttttttttttt11111111111111111111111tlnlnlnlnlnlllnlnlnlnlnlllnlnlnlllnlnlnlllnlnlllllllllllllll1 gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tlnnnlnnllnlllnnnlnnnlnnllnlnlnlllnlnlnlllnnnlllllllllllllllt gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
tt1111tttttttttt1111111ttttt111ttttttttt1111111111111111111111111111lnlnlnlnlnlllnlnlnlnlnlllnlnlnlllnlnlnlnlllnlllllllllllllllt gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
ttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111lnlnlnlnllnnlnlnlnlnlnnnlnnllnnnlnnllnnnlnnnlllllllllllllllt gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
ttttttttttttttt1111111tt1111111ttttttt111t1111111111111111ttttttttt1lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllt gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
tttttttttttttt11111111t1111111tttttttt1111111111111111111ttttttttt11tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
tttttttttttttt111111111111111ttttttttt1111111111111111111tttt1ttt111lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllt 55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
tttttttttttttt11111111111111tttttttttt1111tttttt11111111tttttttt1111llnnlnnnllnnlnnnlllllnnnlnlnllnnlnnnllnnlllllllllllllllllllt 55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
tttttttttttttt1111111111111ttttt111ttt111ttttttttt1111tttttttttt1111lnllllnllnlnlnlnlllllnnnlnlnlnllllnllnlllllllllllllllllllllt 5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
tttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt11111lnnnllnllnlnlnnnlllllnlnlnlnlnnnllnllnlllllllllllllllllllllt 5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
ttttttttttttt111111111111ttttt11111111ttttttttttttttttttttttttt11111lllnllnllnlnlnlllllllnlnlnlnlllnllnllnlllllllllllllllllllllt 5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
ttttttttttttt111111111111111t1111111ttttttttt11ttttttttttttttt111111lnnlllnllnnllnlllllllnlnllnnlnnllnnnllnnlllllllllllllllllllt 5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
tttttttttttt11111111111111111111111ttttttt1111tttttttttttttttt111111lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllt 555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
tttttttttt1111111111111111111111111tttt1111111tttttttttttttttt111111lnnnlnnnllnnlnnnlnnnlllllnnllnnnlnnnlnnnlllllllllllllllllllt 555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
tttttttt1111111111111111111111111111tt11111111tttttttttttttttt111111lnlnlnlllnlllnllllnllllllnlnlnlnllnllnlnlllllllllllllllllllt 55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111lnnllnnllnnnlnnlllnllllllnlnlnnnllnllnnnlllllllllllllllllll1 55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
tttttt111t1111111111111111ttttttttt11111111tttttttttttttttttt1111111lnlnlnlllllnlnllllnllllllnlnlnlnllnllnlnlllllllllllllllllllt gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
tttttt1111111111111111111ttttttttt11111111ttttttttttttttttttt1111111lnlnlnnnlnnllnnnllnllllllnnnlnlnllnllnlnlllllllllllllllllllt gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
tttttt1111111111111111111tttt1ttt11111111ttttttttttttttttttt11111111lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllt gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
tttttt1111tttttt11111111tttttttt11111111ttttt11ttttttttttt1111111111111111111111111tttt1111111tttttttttttttttt11111111111111tttt gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
111ttt111ttttttttt1111tttttttttt1111111ttttt111ttttttttt111111111111nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnt gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
11111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt1111111111111ttttttttttttttttt111111111111ttttt1 gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
111111ttttttttttttttttttttttttt1111111tt1111111ttttttt111t1111111111nnn1n1ntttttnnn1n1n1nnntnnntntntttttnnttt111nn11n1n1nnnttnn1 gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
1111ttttttttt11ttttttttttttttt11111111t1111111tttttttt11111111111111n1n1ntntttttntn1n1n1n1ntntttntntttttnnttt111n1n1n1n1n111n1n1 gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
111ttttttt1111tttttttttttttttt111111111111111ttttttttt11111111111111nn11nnntt1ttnnn1nnn1nnttnntttntttttttnnt1111n1n1nnn1nn11n1n1 gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
111tttt1111111tttttttttttttttt11111111111111tttttttttt1111tttttt1111n1n1ttntttttn11111n1ntntn11tntntttttntn11111n1n111n1n111n1n1 gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
1111tt11111111tttttttttttttttt1111111111111ttttt111ttt111ttttttttt11nnntnnntttttn111nnntntntnnntntntttttnnn11111n1n1nnn1nnn1nn11 gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
1111111111111ttttttttttttttttt111111111111ttttt111111t1tttttttttttttttttttttttt1111111tttt111111ttttttt111111111111111111111tttt gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
__map__ __map__
c30111e665c2b118f005bb151891000098020109634a06445a66afc5d3572f39d001b11430e3e61748055e3fd2637052131f2002560d516492b5020f990002b002f021f560105023b02d203145db2173d6341920c04b96902a31290d662d910e2752f9c05504756d0fb298534135a1a47803080f05360051613425132229001a c30111e665c2b118f005bb151891000098020109634a06445a66afc5d3572f39d001b11430e3e61748055e3fd2637052131f2002560d516492b5020f990002b002f021f560105023b02d203145db2173d6341920c04b96902a31290d662d910e2752f9c05504756d0fb298534135a1a47803080f05360051613425132229001a

View File

@ -1,5 +1,6 @@
state_archaeology=klass() state_archaeology=klass()
function state_archaeology:init() function state_archaeology:init(tips_mode)
self.tips_mode=tips_mode
self.n_holy_books=#liturgy.holy_book self.n_holy_books=#liturgy.holy_book
self:select_book(1) self:select_book(1)
end end
@ -11,6 +12,7 @@ function state_archaeology:suspend() end
function state_archaeology:select_book(n) function state_archaeology:select_book(n)
self.selection=n self.selection=n
if (self.tips_mode) self.title="tips" self.full_text=archaeology_tips return
local lines={} local lines={}
local hb=liturgy.holy_book[self.selection] local hb=liturgy.holy_book[self.selection]
self.title=hb[1] self.title=hb[1]
@ -68,7 +70,25 @@ function state_archaeology:draw()
line(tx,y,tx+tw-1,y,15) line(tx,y,tx+tw-1,y,15)
y+=2 y+=2
print("⬅️",tx,y) if not self.tips_mode then
print("",tx+tw-7,y) print("",tx,y)
print("➡️",tx+tw-7,y)
end
print("❎ go back",1,122,15) print("❎ go back",1,122,15)
end end
archaeology_tips=[[
wise archaeologists know these
secrets:
- hold ❎ to get a new board.
- hold 🅾️ to pick up more than
one card.
- updates and other games by
pyrex and nyeo are
available at nyeogmi.itch.io
and lexaloffle.
only diligent research can
uncover sacred mysteries!
- p & n]]

View File

@ -2,7 +2,9 @@ state_gameround=klass()
function state_gameround:init(watcher,ruleset) function state_gameround:init(watcher,ruleset)
self.board=board:new(watcher,ruleset) self.board=board:new(watcher,ruleset)
self.outcome=nil self.outcome=nil
self.grab_frames=0
self.restart_frames=0 self.restart_frames=0
self.picking_up=false
end end
function state_gameround:enter() self:add_menu() end function state_gameround:enter() self:add_menu() end
function state_gameround:exit() self:remove_menu() end function state_gameround:exit() self:remove_menu() end
@ -22,6 +24,11 @@ end
function state_gameround:update() function state_gameround:update()
self.board:update() self.board:update()
if btn(4) then
self.grab_frames+=1
else
self.grab_frames=0
end
if btn(5) then if btn(5) then
self.restart_frames+=1 self.restart_frames+=1
else else
@ -30,22 +37,32 @@ function state_gameround:update()
local restart_progress=self.restart_frames/60 local restart_progress=self.restart_frames/60
self.board:set_restart_progress(restart_progress) self.board:set_restart_progress(restart_progress)
if restart_progress>=1.0 then if restart_progress>=1.0 then
main.state_manager:push(state_restartmenu:new()) self.outcome="restart"
self.done=true
return return
end end
if self.board:can_take_input() then if self.board:can_take_input() then
if (btnp(0)) self.board.cursor:move_x(-1) if (btnp(0)) self.board.cursor:move_x(-1) self.picking_up=false
if (btnp(1)) self.board.cursor:move_x(1) if (btnp(1)) self.board.cursor:move_x(1) self.picking_up=false
if (btnp(2)) self.board.cursor:move_y(-1) if (btnp(2)) self.board.cursor:move_y(-1) self.picking_up=false
if (btnp(3)) self.board.cursor:move_y(1) if (btnp(3)) self.board.cursor:move_y(1) self.picking_up=false
if (btnp(4)) self.board.cursor:toggle_grab() if btnp(4) then
if self.grab_frames<4 then
self.board.cursor:toggle_grab()
self.picking_up=true
else
self.board.cursor:incr_grab()
end
end
if btnp(5) and self.restart_frames < 4 then if btnp(5) and self.restart_frames < 4 then
if self.board.cursor:grabbed_card() then if self.board.cursor:grabbed_card() then
self.board.cursor:drop_grab() self.board.cursor:drop_grab()
else else
self.board:undo() self.board:undo()
self.picking_up=false
end end
end end
end end

View File

@ -2,13 +2,14 @@ state_menu=klass()
function state_menu:init() function state_menu:init()
self.selection=1 self.selection=1
self.frame=0 self.frame=0
local function plain_opt(n,s,a)
return menu_option:new(function() return n end,function()
main.state_manager:push(s:new(a))
end)
end
self.options={ self.options={
menu_option:new(function() return "excavate" end,function() plain_opt("excavate",state_excavate_menu,self),
main.state_manager:push(state_excavate_menu:new(self)) plain_opt("archaeology",state_archaeology),
end),
menu_option:new(function() return "archaeology" end,function()
main.state_manager:push(state_archaeology:new())
end),
menu_option:new(), menu_option:new(),
menu_option:new(function() menu_option:new(function()
local pref=completion_tracker:get_music_preference() local pref=completion_tracker:get_music_preference()
@ -17,9 +18,8 @@ function state_menu:init()
end,function() end,function()
completion_tracker:set_music_preference(not completion_tracker:get_music_preference()) completion_tracker:set_music_preference(not completion_tracker:get_music_preference())
end), end),
menu_option:new(function() return "reset data" end,function() plain_opt("reset data",state_reset_menu,self),
main.state_manager:push(state_reset_menu:new(self)) plain_opt("tips",state_archaeology,true)
end)
} }
end end
function state_menu:enter() end function state_menu:enter() end

View File

@ -1,24 +0,0 @@
state_restartmenu=klass()
function state_restartmenu:init()
end
function state_restartmenu:enter()
-- for now, make this only a restart button
self.outcome="restart" self.done=true
end
function state_restartmenu:exit(new_top)
new_top.outcome=self.outcome
new_top.done=true
end
function state_restartmenu:reenter() end
function state_restartmenu:suspend() end
function state_restartmenu:update()
if (btnp(0)) self.outcome="menu" self.done=true
if (btnp(4)) self.outcome="restart" self.done=true
end
function state_restartmenu:draw()
cls(13)
print("⬅️ back to menu",1,58,7)
print("🅾️ restart",1,64,7)
end

View File

@ -11,7 +11,7 @@ function state_wonironman:reenter() end
function state_wonironman:suspend() end function state_wonironman:suspend() end
function state_wonironman:update() function state_wonironman:update()
if (btnp(4)) sounds:menu() self.done=true if (btnp(4)) sounds:menu() self.done=true self.outcome="menu"
end end
function state_wonironman:draw() function state_wonironman:draw()
cls(13) cls(13)

View File

@ -12,8 +12,7 @@ function state_wonround:enter()
sounds:win() sounds:win()
completion_tracker:mark_seen(self.verse_id) completion_tracker:mark_seen(self.verse_id)
completion_tracker:advance_completion_level(self.board:get_completion_level()) completion_tracker:advance_completion_level(self.board:get_completion_level())
self.has_tip = not seen_tip_this_session if (self.board.watcher:allow_tips()) self.tip=deli(_won_round_tips,1) add(_won_round_tips,self.tip)
seen_tip_this_session=true
end end
function state_wonround:exit(new_top) end function state_wonround:exit(new_top) end
@ -65,9 +64,13 @@ function state_wonround:draw()
print("next",57,y+2,15) print("next",57,y+2,15)
print("(🅾️)",57,y+8,15) print("(🅾️)",57,y+8,15)
if self.has_tip then if self.tip then
local tip="tip: hold ❎ to restart" local w=measure_text(self.tip)
local w=measure_text(tip) print(self.tip,64-w\2,122,15)
print(tip,64-w\2,122,15)
end end
end end
_won_round_tips={
"tip: hold ❎ to restart",
"tip: hold 🅾️ to stack cards"
}

View File

@ -28,7 +28,7 @@ tutorial={
tutorial_grab:new(6,8,"they have their own well."), tutorial_grab:new(6,8,"they have their own well."),
tutorial_grab:new(2,6,"it can't be blocked."), tutorial_grab:new(2,6,"it can't be blocked."),
tutorial_grab:new(2,4,"stack ascending or descending."), tutorial_grab:new(2,4,"stack ascending or descending."),
tutorial_grab:new(3,1,"collect the last scroll\nto read it!"), tutorial_grab:new(3,1,"collect the last card\nto read a scroll!"),
}) })
end, end,
standard_watcher_cb(4), standard_watcher_cb(4),

View File

@ -3,6 +3,10 @@ function watcher:init(ruleset,seed,stages)
self.ruleset=ruleset self.ruleset=ruleset
self.seed=seed self.seed=seed
self._stages=stages or {} self._stages=stages or {}
self._allow_tips=#self._stages == 0
end
function watcher:allow_tips()
return self._allow_tips
end end
function watcher:active_stage(board) function watcher:active_stage(board)
local stage=self._stages[1] local stage=self._stages[1]
@ -67,7 +71,7 @@ function tutorial_grab:draw(board,layouts)
text="🅾️" text="🅾️"
else else
layout=layouts:slot(self.dst) layout=layouts:slot(self.dst)
i=#board.slots[self.dst].contents+1 i=#board.slots[self.dst].contents+2
draw_layout_hint(layout,i,15,false,true) draw_layout_hint(layout,i,15,false,true)
text="🅾️" text="🅾️"
end end