Skip to content

Instantly share code, notes, and snippets.

@polm
Created May 19, 2015 15:51
Show Gist options
  • Save polm/501b320106dc197975a1 to your computer and use it in GitHub Desktop.
Save polm/501b320106dc197975a1 to your computer and use it in GitHub Desktop.
Bingo comparison: with STATE and with driver function
pico-8 cartridge // http://www.pico-8.com
version 4
__lua__
-- version without "state" string
-- ultra magic bingo quest world
-- ld48 #32 - by 23
-- rules
-- try to make bingo to hurt
-- your opponent
-- but don't fill the dead pile!
-- you have a board (3x3) and
-- three cards
-- play a card to fill in that
-- square
-- three in a row is a bingo
-- damage works this way
-- - if the deapile is full
-- (5 nums), whoever filled
-- it takes 5 damage
-- - on bingo, damage is
-- - 5 * bingos
-- - plus the deal pile size
-- four complete stages!
-- completely random ai!
-- can you beat it?
-- toggle blinking/flashing
blinky = true
function rr (x)
return flr(rnd(x))
end
function size(ll)
local sz = 0
for ii in all(ll) do
sz = sz + 1 end
return sz
end
-- insertion sort
function sort (ll)
for ii = 1,size(ll) do
local jj = ii
while jj > 0
and ll[jj-1] > ll[jj] do
local tt = ll[jj]
ll[jj] = ll[jj-1]
ll[jj-1] = tt
jj = jj - 1
end
end
return ll
end
-- fisher yates shuffle
function shuf(ll)
ss = size(ll)
for ii=0,ss-1 do
local jj = rr(ss-ii) + ii
tt=ll[jj]
ll[jj]=ll[ii]
ll[ii]=tt
end
return ll
end
-- get current stage
function gcs()
return stages[""..stage]
end
function _init()
debugarr = {"one", "two",
"three"}
frame = 0
boards=makeboards()
deck = makedeck()
hands = {
player=deck:deal(),
enemy =deck:deal()}
marked = {}
activecard=0
player={hp=15}
enemy={hp=15}
stage = 0
doupdate = u_genwait
dodraw = d_normal
genstart = 0
deadpile = {count=0}
stages ={}
stages["0"] = {
title=" haxx ",
fg=11,bg=0,
pfg=10,pbg=8}
stages["1"] = {
title="shifting sands",
fg=9,bg=10,
pfg=0,pbg=8}
stages["2"] = {
title=" slush central",
fg=7,bg=12,
pfg=10,pbg=8}
stages["3"] = {
title=" disco hell ",
fg=8,bg=2,
pfg=10,pbg=8}
stages["4"] = {
title=" monokuro st ",
fg=7, bg=0,
pfg=10,pbg=8}
--music(0)
local cs = stages[""..stage]
fg = cs.fg bg = cs.bg
end
function freshboards()
deadpile = {count=0}
marked={}
boards = makeboards()
deck = makedeck()
hands = {
player=deck:deal(),
enemy=deck:deal()}
end
function nextstage()
stage = stage +1
player={fg=4,bg=8,hp=15}
local cs=stages[""..stage]
enemy={fg=cs.fg,bg=cs.bg,hp=15}
fg = cs.fg bg=cs.bg
freshboards()
end
function u_cputurn()
deadpilefilled =
cpu_deadpilefilled
-- todo: be smart
-- for now just be random
ci=rr(3)
sfx(3)
playcard(hands.enemy[ci])
hands.enemy[ci]=deck:draw()
if doupdate == u_cputurn then
-- didn't win or anything
doupdate = u_playerturn end
end
function debugcheck()
doupdate = function () end
camera()
-- check random
dd = makedeck()
rectfill(0,0,127,127,1)
color(7)
for i = 0,29 do
print(dd:draw(),
20*flr(i/10),
6 * (i%10))
end
print(size(range(1,31)),10,80)
print(nil,10,90)
print(debugarr[1], 10,100)
end
function _update()
frame = frame + 1
doupdate()
end
function u_cputhink()
cursor = cpu_cursor
if frame - thinkstart > 90 then
doupdate = u_cputurn
end
end
function u_message()
if btnp(4) then
doupdate = nextstate
dodraw = d_normal
end
end
function u_nextround()
freshboards()
doupdate = u_playerturn
end
function u_nextstage()
nextstage()
genstart = frame
doupdate = u_genwait
end
function u_restart()
stage = -1
nextstage()
genstart = frame
doupdate = u_genwait
end
function u_genwait()
if frame - genstart > 30 then
freshboards()
doupdate = u_playerturn
end
if blinky then
freshboards() end
end
function u_playerturn()
deadpilefilled = player_deadpilefilled
cursor=player_cursor
if btnp(0) then
activecard = max(0,activecard-1) end
if btnp(1) then
activecard = min(2,activecard+1) end
-- play card
if btnp(4) then
sfx(1)
playcard(
hands.player[activecard])
hands.player[activecard]
=deck:draw()
if doupdate == u_playerturn then
-- did not win or lose
doupdate = u_cputhink
thinkstart = frame
end
end
end
function player_cursor()
local period = 20
local tick = frame % period
xo = 2+ activecard * 10
if tick > period/2
then spr(0,xo,-8)
else spr(1,xo,-8)
end
end
function cpu_cursor()
local period = 20
local tick = frame % period
local ci = flr((frame%30)/10)
xo = 62 + ci * 10
if tick > period/2
then spr(32,xo,-8)
else spr(33,xo,-8)
end
end
function drawhealth (cc)
local fg = stages[""..stage].fg
print(cc,0,2,fg)
spr(16,8,0)
end
function drawbg()
rectfill(0,0,127,127,0)
-- first draw the stage bg
-- haxx
if blinky and stage == 0 then
rectfill(0,0,127,127,0)
local ff = (frame%100)/10
local fh = (frame%256)
fh = abs(fh-127)
ff = abs(ff-5)
for i=0,5 do
circ(0,127-fh,i*5*ff,fg)
circ(127,fh,i*5*ff,fg)
end
end
-- shifting sands
if blinky and stage == 1 then
rectfill(0,0,127,127,0)
local tick=(frame%60)/10
local tt = abs(tick-5)
for i=0,12 do
for j=0,12 do
for k=0,3 do
circ(i*12+tt,j*12,
tick*k,fg)
end end end
end
-- slush central
if blinky and stage == 2 then
rectfill(0,0,127,127,1)
local tick=(frame%320)/5
local tt = tick /2
for i=-2,8 do
for j=-4,8 do
-- watch for negatives!
if (i+j+100)%2 > 0 then
circfill(i*16+tt,j*16+tick,8,fg)
end end end
end
--disco hell
if blinky and stage == 3 then
rectfill(0,0,127,127,0)
local tt=flr((frame%80)/20)
local cols = {8,9,1,2}
for i=0,128,16 do
for j=0,128,16 do
local cc = cols[1 +
((tt+ ((i+j) / 16))%4)]
rectfill(i,j,i+16,j+16,cc)
end end
end
-- monokuro st
if stage==4 then
end
-- then make it a frame
rectfill(16,16,114,106,fg)
rectfill(18,18,112,104,bg)
end
function drawstagename()
camera()
rectfill(32,5,96,24,fg)
rectfill(34,7,94,22,bg)
local ss = stage + 1
local tt = stages[""..stage].title
print("stage " .. ss,50,8,fg)
print(tt,37,14,fg)
end
function drawui()
drawstagename()
camera(-20,-20)
drawboard(boards.player,
gcs().pfg, gcs().pbg)
camera(-80,-20)
drawboard(boards.enemy,
fg,bg)
camera(-20,-60)
drawhand(hands.player,
gcs().pfg,gcs().pbg)
cursor()
camera(-20,-74)
drawhealth(player.hp)
camera(-80,-60)
drawhand({},gcs().fg,gcs().bg)
camera(-95,-74)
drawhealth(enemy.hp)
camera(-40,-90)
drawdeadpile(enemy.fg,enemy.bg)
end
function _draw()
camera()
dodraw()
end
-- no-op
function d_message() end
function d_normal()
drawbg() drawui()
end
-- deck functions
function makedeck ()
local deck = {}
deck._cards = shuf(range(1,31))
deck.draw = function (me)
cc = me._cards[0]
me._cards = drop(me._cards,1)
return cc
end
deck.deal = function (me)
cc = take(me._cards,3)
me._cards = drop(me._cards,3)
return cc
end
deck.empty = function (me)
return size(me._cards) == 0
end
return deck
end
-- is this a winning board?
function isbingo(board)
-- eight possible bingos
-- double, triple possible
bcount = 0
local b = board
for ii=0,2 do
-- vertical
if marked[""..b[ii][0]] and
marked[""..b[ii][1]] and
marked[""..b[ii][2]] then
bcount = bcount + 1 end
-- horizontal
if marked[""..b[0][ii]] and
marked[""..b[1][ii]] and
marked[""..b[2][ii]] then
bcount = bcount + 1 end end
-- diagonals
if marked[""..b[0][0]] and
marked[""..b[1][1]] and
marked[""..b[2][2]] then
bcount = bcount + 1 end
if marked[""..b[2][0]] and
marked[""..b[1][1]] and
marked[""..b[0][2]] then
bcount = bcount + 1 end
return bcount
end
function boardhas(cc,board)
for i=0,2 do
for j=0,2 do
if board[i][j]==cc then
return true end end end
return false
end
-- play a card
-- for player and cpu
function playcard(cc)
marked[""..cc] = true
-- check bingos
local found = false
if boardhas(cc,boards.player) then
found = true
bcount = isbingo(boards.player)
if bcount > 0 then
enemy.hp = enemy.hp
-(bcount*5)
-(deadpile.count)
dodraw = winplayer
return end end
if boardhas(cc,boards.enemy) then
found = true
bcount = isbingo(boards.enemy)
if bcount > 0 then
player.hp = player.hp
-(bcount*5)
-(deadpile.count)
dodraw = wincpu
return end end
if not found then
-- if we get here it's dead
deadpile[deadpile.count] = cc
deadpile.count = deadpile.count+1
-- deadpile has a size limit
if deadpile.count >= 5 then
deadpilefilled()
end end
end
function drawhand (hand,fg,bg)
rectfill(0,0,30,8,fg)
for ci=0,2 do
drawsquare(hand[ci],
10*ci,0,fg,bg)
end
end
-- for info etc
-- pass in next state
function message (ms,ms2,ns)
camera()
nextstate = ns
doupdate = u_message
dodraw = d_message
rectfill(20,32,108,80,fg)
rectfill(22,34,106,78,bg)
print(ms,30,50,fg)
print(ms2,30,60,fg)
end
function drawdeadpile ()
ss = deadpile.count
--rectfill(0,0,10*ss,8,fg)
print("deadpile",10,-8,fg)
rectfill(0,0,50,8,fg)
for ci=0,4 do
if deadpile[ci] then
drawsquare(deadpile[ci],
10*ci,0,fg,bg)
else
drawsquare(nil,
10*ci,0,fg,bg)
end
end
end
function drawsquare(nn,x,y,fg,bg)
-- handle dummy cpu hand
if nn == nil then nn = "??" end
-- swap colors if this is marked
if marked["" .. nn] then
tt = fg
fg = bg
bg = tt end
rectfill(x+1,y+1,x+9,y+7,bg)
if nn == "??" then
-- do nothing, can't compare
elseif nn < 10 then
nn = " " .. nn end
color(fg)
print(nn,x+2,y+2)
end
-- set the camera before calling
function drawboard(cc,fg,bg)
rectfill(0,0,30,24,fg)
color(fg)
for i=0,2 do
for j=0,2 do
xo=(10*i)
yo=(8*j)
drawsquare(cc[i][j],xo,yo,fg,bg)
end
end
end
function take(ll,cc)
local aa = {}
for ii=0,cc-1 do
aa[ii] = ll[ii]
end
return aa
end
function drop(ll,cc)
local aa = {}
for ii=cc,size(ll) do
aa[ii-cc] = ll[ii]
end
return aa
end
function range(mi,ma)
local aa = {}
for ii=mi,ma-1 do
aa[ii-mi] = ii
end
return aa
end
-- make a pair of boards for
-- player and enemy
-- non-overlapping
function makeboards()
local boards = {player={},enemy={}}
for i=0,2 do
bottom = 1 + (i*10)
top = 1 + ((i+1) * 10)
nums = range(bottom, top)
nums = shuf(nums)
boards.player[i]
= sort(take(nums,3))
nums = drop(nums,3)
boards.enemy[i]
= sort(take(nums,3))
end
return boards
end
function player_deadpilefilled()
player.hp = player.hp - 5
message("you filled the",
"dead pile! owww...",
wincpu)
end
function cpu_deadpilefilled()
enemy.hp = enemy.hp - 5
message("they filled the",
"dead pile - nice!",
winplayer)
end
function winplayer()
sfx(6)
if stage == 3 then
message("wow! you beat",
"everything! thanks!",
u_restart)
elseif enemy.hp <= 0 then
message("you beat them!", "",
u_nextstage)
else
message("you won", "but it's not over!",
u_nextround)
end
end
function wincpu()
sfx(2)
if player.hp <= 0 then
message("game over!", "",u_restart)
else
message("you lose this round!",
"try again",
u_nextround)
end
end
__gfx__
0000000000000000000c00c000000000c0c000c0000000000000000000000000b00b00b059aa59affa95aa950000000000000000000000000000000000000000
cc7c11c000000000c1c00c0000c000c00000000000000000000000000000000000b00b0095aa95faaf59aa590000000000000000000000000000000000000000
0ccc1c00cc7c11c01c1c11c0000c00c0000010000000000000000000000000000b00b00ba95aa95ff59aa59a0000000000000000000000000000000000000000
00ccc0000ccc1c00c1aaa1c000c01c00019aa100000000000000000000000000b00b00b0a59aa59aa95aa95a0000000000000000000000000000000000000000
000c000000ccc0001a117a1001aaa1c019117a1000000000000000000000000000b00b00a95aa95ff59aa59a0000000000000000000000000000000000000000
00000000000c0000c1a7a1c01a117a1001a7a1000000000000000000000000000b00b00ba59aa59aa95aa95a0000000000000000000000000000000000000000
00000000000000000c1a1cc001a7a100001a1000000000000000000000000000b00b00b059aa59affa95aa950000000000000000000000000000000000000000
000000000000000000000000001a10000000000000000000000000000000000000b00b0095aa95faaf59aa590000000000000000000000000000000000000000
0000000000cccc000000b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00ee08800c0000c0000bb3000000b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0e7e8e88c0cccc0c00b7b330000bb300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
07e8e8e8c0cccc0c0b77b33300b7b330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0e8e8e82cc0000cc00bcbbb00b77b333000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00e8e8200cccccc0000bbb0000bcbbb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0008880000cccc000000b000000bbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00008000000cc000000000000000b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
88782280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
08882800887822800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00888000088828000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00080000008880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__gff__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0909090909090909090900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
0008000900000091700e1701117013170201701b1701e1701f17020170211702a5702e5700c5701257020570255702b5702d570200702107022070230702507027070270701b0701a07018070170701707019070
0002000020070260703007035070380703e0700f000010000100001000010000100032400314003140031400314002a5002850024500285002650029500265002550027500275002550026500275002650028500
00040000307702e7702d77026770247701f7701c7701b7701777013770117700e7700e77003470034700347003400044000640003470034700347002470256000000000000000000000000000000000000000000
00080000060700c0701107018070040700d0701707018070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011000200b500105750e6020c6750e500105751e5000c6750c6041e5000e6750c6751e5000d5020e6750c6750c604105750e6020c6750c60510575115000c6751e500225000e6750c6750f500165000e6750c675
001000201577000000000001a7700000021770000002777000000207700000022770000002377024770000002277000000097700a7701c700000001c770207702377000000077700877000000217702477000000
000c0000291701d2002b1702f17032170331703317033170361003310032100321043610436104271042710427104271042710427104271041600017000170001630016300173001830018300193000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__music__
00 05044344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
pico-8 cartridge // http://www.pico-8.com
version 4
__lua__
-- version submitted to ld
-- ultra magic bingo quest world
-- ld48 #32 - by 23
-- rules
-- try to make bingo to hurt
-- your opponent
-- but don't fill the dead pile!
-- you have a board (3x3) and
-- three cards
-- play a card to fill in that
-- square
-- three in a row is a bingo
-- damage works this way
-- - if the deapile is full
-- (5 nums), whoever filled
-- it takes 5 damage
-- - on bingo, damage is
-- - 5 * bingos
-- - plus the deal pile size
-- four complete stages!
-- completely random ai!
-- can you beat it?
function rr (x)
return flr(rnd(x))
end
function size(ll)
local sz = 0
for ii in all(ll) do
sz = sz + 1 end
return sz
end
-- insertion sort
function sort (ll)
for ii = 1,size(ll) do
local jj = ii
while jj > 0
and ll[jj-1] > ll[jj] do
local tt = ll[jj]
ll[jj] = ll[jj-1]
ll[jj-1] = tt
jj = jj - 1
end
end
return ll
end
-- fisher yates shuffle
function shuf(ll)
ss = size(ll)
for ii=0,ss-1 do
local jj = rr(ss-ii) + ii
tt=ll[jj]
ll[jj]=ll[ii]
ll[ii]=tt
end
return ll
end
-- get current stage
function gcs()
return stages[""..stage]
end
function _init()
frame = 0
boards=makeboards()
deck = makedeck()
hands = {
player=deck:deal(),
enemy =deck:deal()}
marked = {}
activecard=0
player={hp=15}
enemy={hp=15}
stage = 0
state = "genwait"
genstart = 0
deadpile = {count=0}
stages ={}
stages["0"] = {
title=" haxx ",
fg=11,bg=0,
pfg=10,pbg=8}
stages["1"] = {
title="shifting sands",
fg=9,bg=10,
pfg=0,pbg=8}
stages["2"] = {
title=" slush central",
fg=7,bg=12,
pfg=10,pbg=8}
stages["3"] = {
title=" disco hell ",
fg=8,bg=2,
pfg=10,pbg=8}
stages["4"] = {
title=" monokuro st ",
fg=7, bg=0,
pfg=10,pbg=8}
--music(0)
local cs = stages[""..stage]
fg = cs.fg bg = cs.bg
end
function freshboards()
deadpile = {count=0}
marked={}
boards = makeboards()
deck = makedeck()
hands = {
player=deck:deal(),
enemy=deck:deal()}
end
function nextstage()
stage = stage +1
player={fg=4,bg=8,hp=15}
local cs=stages[""..stage]
enemy={fg=cs.fg,bg=cs.bg,hp=15}
fg = cs.fg bg=cs.bg
freshboards()
end
function cputurn()
-- todo: be smart
-- for now just be random
ci=rr(3)
sfx(3)
playcard(hands.enemy[ci])
hands.enemy[ci]
=deck:draw()
if state == "turn.cpu" then
-- didn't win or anything
state = "turn.player" end
end
function _update()
frame = frame + 1
if btnp(5)
then state="restart" end
-- move cursor
if state == "turn.player" then
playerturn()
elseif state == "turn.cpu" then
cputurn()
elseif state == "cpu.thinking" then
-- todo animate thinking
if frame - thinkstart > 90 then
state = "turn.cpu" end
elseif state == "message" then
if btnp(4) then
state = nextstate end
elseif state == "next.round" then
freshboards()
state="turn.player"
elseif state == "next.stage" then
nextstage()
genstart = frame
state="genwait"
elseif state == "restart" then
stage = 0
genstart = frame
elseif state == "genwait" then
if frame - genstart > 30 then
state = "turn.player"
end
freshboards()
end
end
function playerturn()
if btnp(0) then
activecard = max(0,activecard-1) end
if btnp(1) then
activecard = min(2,activecard+1) end
-- play card
if btnp(4) then
sfx(1)
playcard(
hands.player[activecard])
hands.player[activecard]
=deck:draw()
if state == "turn.player" then
-- did not win or lose
state = "cpu.thinking"
thinkstart = frame
end
end
end
function drawcursor()
if state ~= "turn.player"
then return end
local period = 20
local tick = frame % period
xo = 2+ activecard * 10
if tick > period/2
then spr(0,xo,-8)
else spr(1,xo,-8)
end
end
function drawcpucursor()
if state ~= "cpu.thinking"
then return end
local period = 20
local tick = frame % period
local ci = flr((frame%30)/10)
xo = 2+ ci * 10
if tick > period/2
then spr(32,xo,-8)
else spr(33,xo,-8)
end
end
function drawhealth (cc)
local fg = stages[""..stage].fg
print(cc,0,2,fg)
spr(16,8,0)
end
function drawbg()
-- first draw the stage bg
-- haxx
if stage == 0 then
rectfill(0,0,127,127,0)
local ff = (frame%100)/10
local fh = (frame%256)
fh = abs(fh-127)
ff = abs(ff-5)
for i=0,5 do
circ(0,127-fh,i*5*ff,fg)
circ(127,fh,i*5*ff,fg)
end
end
-- shifting sands
if stage == 1 then
rectfill(0,0,127,127,0)
local tick=(frame%60)/10
local tt = abs(tick-5)
for i=0,12 do
for j=0,12 do
for k=0,3 do
circ(i*12+tt,j*12,
tick*k,fg)
end end end
end
-- slush central
if stage == 2 then
rectfill(0,0,127,127,1)
local tick=(frame%320)/5
local tt = tick /2
for i=-2,8 do
for j=-4,8 do
-- watch for negatives!
if (i+j+100)%2 > 0 then
circfill(i*16+tt,j*16+tick,8,fg)
end end end
end
--disco hell
if stage == 3 then
rectfill(0,0,127,127,0)
local tt=flr((frame%80)/20)
local cols = {8,9,1,2}
for i=0,128,16 do
for j=0,128,16 do
local cc = cols[1 +
((tt+ ((i+j) / 16))%4)]
rectfill(i,j,i+16,j+16,cc)
end end
end
-- monokuro st
if stage==4 then
end
-- then make it a frame
rectfill(16,16,114,106,fg)
rectfill(18,18,112,104,bg)
end
function drawstagename()
camera()
rectfill(32,5,96,24,fg)
rectfill(34,7,94,22,bg)
local ss = stage + 1
local tt = stages[""..stage].title
print("stage " .. ss,50,8,fg)
print(tt,37,14,fg)
end
function drawui()
drawstagename()
camera(-20,-20)
drawboard(boards.player,
gcs().pfg, gcs().pbg)
camera(-80,-20)
drawboard(boards.enemy,
fg,bg)
camera(-20,-60)
drawhand(hands.player,
gcs().pfg,gcs().pbg)
drawcursor()
camera(-20,-74)
drawhealth(player.hp)
camera(-80,-60)
drawhand({},
gcs().fg,gcs().bg)
drawcpucursor()
camera(-95,-74)
drawhealth(enemy.hp)
camera(-40,-90)
drawdeadpile(enemy.fg,enemy.bg)
end
function _draw()
camera()
if state == "message" then
return end
if state == "player.win" then
winplayer() return end
if state == "cpu.win" then
wincpu() return end
drawbg()
drawui()
end
-- deck functions
function makedeck ()
local deck = {}
deck._cards = shuf(range(1,31))
deck.draw = function (me)
cc = me._cards[0]
me._cards = drop(me._cards,1)
return cc
end
deck.deal = function (me)
cc = take(me._cards,3)
me._cards = drop(me._cards,3)
return cc
end
deck.empty = function (me)
return size(me._cards) == 0
end
return deck
end
-- is this a winning board?
function isbingo(board)
-- eight possible bingos
-- double, triple possible
bcount = 0
local b = board
for ii=0,2 do
-- vertical
if marked[""..b[ii][0]] and
marked[""..b[ii][1]] and
marked[""..b[ii][2]] then
bcount = bcount + 1 end
-- horizontal
if marked[""..b[0][ii]] and
marked[""..b[1][ii]] and
marked[""..b[2][ii]] then
bcount = bcount + 1 end end
-- diagonals
if marked[""..b[0][0]] and
marked[""..b[1][1]] and
marked[""..b[2][2]] then
bcount = bcount + 1 end
if marked[""..b[2][0]] and
marked[""..b[1][1]] and
marked[""..b[0][2]] then
bcount = bcount + 1 end
return bcount
end
function boardhas(cc,board)
for i=0,2 do
for j=0,2 do
if board[i][j]==cc then
return true end end end
return false
end
-- play a card
-- for player and cpu
function playcard(cc)
marked[""..cc] = true
-- check bingos
local found = false
if boardhas(cc,boards.player) then
found = true
bcount = isbingo(boards.player)
if bcount > 0 then
enemy.hp = enemy.hp
-(bcount*5)
-(deadpile.count)
state = "player.win"
return end end
if boardhas(cc,boards.enemy) then
found = true
bcount = isbingo(boards.enemy)
if bcount > 0 then
player.hp = player.hp
-(bcount*5)
-(deadpile.count)
state = "cpu.win"
return end end
if not found then
-- if we get here it's dead
deadpile[deadpile.count] = cc
deadpile.count = deadpile.count+1
-- deadpile has a size limit
if deadpile.count >= 5 then
deadpilefull()
end end
end
function drawhand (hand,fg,bg)
rectfill(0,0,30,8,fg)
for ci=0,2 do
drawsquare(hand[ci],
10*ci,0,fg,bg)
end
end
-- for info etc
-- pass in next state
function message (ms,ms2,ns)
camera()
nextstate = ns
state = "message"
rectfill(20,32,108,80,fg)
rectfill(22,34,106,78,bg)
print(ms,30,50,fg)
print(ms2,30,60,fg)
end
function drawdeadpile ()
ss = deadpile.count
--rectfill(0,0,10*ss,8,fg)
print("deadpile",10,-8,fg)
rectfill(0,0,50,8,fg)
for ci=0,4 do
if deadpile[ci] then
drawsquare(deadpile[ci],
10*ci,0,fg,bg)
else
drawsquare(nil,
10*ci,0,fg,bg)
end
end
end
function drawsquare(nn,x,y,fg,bg)
-- handle dummy cpu hand
if nn == nil then nn = "??" end
-- swap colors if this is marked
if marked["" .. nn] then
tt = fg
fg = bg
bg = tt end
rectfill(x+1,y+1,x+9,y+7,bg)
if nn == "??" then
-- do nothing, can't compare
elseif nn < 10 then
nn = " " .. nn end
color(fg)
print(nn,x+2,y+2)
end
-- set the camera before calling
function drawboard(cc,fg,bg)
rectfill(0,0,30,24,fg)
color(fg)
for i=0,2 do
for j=0,2 do
xo=(10*i)
yo=(8*j)
drawsquare(cc[i][j],xo,yo,fg,bg)
end
end
end
function take(ll,cc)
local aa = {}
for ii=0,cc-1 do
aa[ii] = ll[ii]
end
return aa
end
function drop(ll,cc)
local aa = {}
for ii=cc,size(ll)-1 do
aa[ii-cc] = ll[ii]
end
return aa
end
function range(mi,ma)
local aa = {}
for ii=mi,ma-1 do
aa[ii-mi] = ii
end
return aa
end
-- make a pair of boards for
-- player and enemy
-- non-overlapping
function makeboards()
local boards = {player={},enemy={}}
for i=0,2 do
bottom = 1 + (i*10)
top = 1 + ((i+1) * 10)
nums = range(bottom, top)
nums = shuf(nums)
boards.player[i]
= sort(take(nums,3))
nums = drop(nums,3)
boards.enemy[i]
= sort(take(nums,3))
end
return boards
end
function deadpilefull()
if state == "turn.player" then
player.hp = player.hp -5
message("you filled the ",
"dead pile! owww...",
"cpu.win")
else
enemy.hp = enemy.hp -5
message("they filled the",
"dead pile - nice!",
"player.win")
end
end
function winplayer()
sfx(6)
if stage == 3 then
message("wow! you beat",
"everything! thanks!",
"restart")
elseif enemy.hp <= 0 then
message("you beat them!", "",
"next.stage")
else
message("you won", "but it's not over!",
"next.round")
end
end
function wincpu()
sfx(2)
if player.hp <= 0 then
message("game over!", "","restart")
else
message("you lose this round!", "try again","next.round")
end
end
__gfx__
0000000000000000000c00c000000000c0c000c0000000000000000000000000b00b00b059aa59affa95aa950000000000000000000000000000000000000000
cc7c11c000000000c1c00c0000c000c00000000000000000000000000000000000b00b0095aa95faaf59aa590000000000000000000000000000000000000000
0ccc1c00cc7c11c01c1c11c0000c00c0000010000000000000000000000000000b00b00ba95aa95ff59aa59a0000000000000000000000000000000000000000
00ccc0000ccc1c00c1aaa1c000c01c00019aa100000000000000000000000000b00b00b0a59aa59aa95aa95a0000000000000000000000000000000000000000
000c000000ccc0001a117a1001aaa1c019117a1000000000000000000000000000b00b00a95aa95ff59aa59a0000000000000000000000000000000000000000
00000000000c0000c1a7a1c01a117a1001a7a1000000000000000000000000000b00b00ba59aa59aa95aa95a0000000000000000000000000000000000000000
00000000000000000c1a1cc001a7a100001a1000000000000000000000000000b00b00b059aa59affa95aa950000000000000000000000000000000000000000
000000000000000000000000001a10000000000000000000000000000000000000b00b0095aa95faaf59aa590000000000000000000000000000000000000000
0000000000cccc000000b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00ee08800c0000c0000bb3000000b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0e7e8e88c0cccc0c00b7b330000bb300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
07e8e8e8c0cccc0c0b77b33300b7b330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0e8e8e82cc0000cc00bcbbb00b77b333000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00e8e8200cccccc0000bbb0000bcbbb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0008880000cccc000000b000000bbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00008000000cc000000000000000b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
88782280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
08882800887822800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00888000088828000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00080000008880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__gff__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
090909090909090909090909090909090a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0909090909090909090900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
0008000900000091700e1701117013170201701b1701e1701f17020170211702a5702e5700c5701257020570255702b5702d570200702107022070230702507027070270701b0701a07018070170701707019070
0002000020070260703007035070380703e0700f000010000100001000010000100032400314003140031400314002a5002850024500285002650029500265002550027500275002550026500275002650028500
00040000307702e7702d77026770247701f7701c7701b7701777013770117700e7700e77003470034700347003400044000640003470034700347002470256000000000000000000000000000000000000000000
00080000060700c0701107018070040700d0701707018070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011000200b500105750e6020c6750e500105751e5000c6750c6041e5000e6750c6751e5000d5020e6750c6750c604105750e6020c6750c60510575115000c6751e500225000e6750c6750f500165000e6750c675
001000201577000000000001a7700000021770000002777000000207700000022770000002377024770000002277000000097700a7701c700000001c770207702377000000077700877000000217702477000000
000c0000291701d2002b1702f17032170331703317033170361003310032100321043610436104271042710427104271042710427104271041600017000170001630016300173001830018300193000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__music__
00 05044344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment