Variable board size
This commit is contained in:
parent
988460d8b5
commit
3432f5d36e
6
0hh1.p8
6
0hh1.p8
|
@ -1,5 +1,5 @@
|
||||||
pico-8 cartridge // http://www.pico-8.com
|
pico-8 cartridge // http://www.pico-8.com
|
||||||
version 36
|
version 38
|
||||||
__lua__
|
__lua__
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ __gfx__
|
||||||
cc0cc01101100cc0cc08801100110110110110011011011011001101101101100880110110110011011011011001101101101100000000000000000000000000
|
cc0cc01101100cc0cc08801100110110110110011011011011001101101101100880110110110011011011011001101101101100000000000000000000000000
|
||||||
cc0cc01101100cc0cc08801100110110110110011011011011001101101101100880110110110011011011011001101101101100000000000000000000000000
|
cc0cc01101100cc0cc08801100110110110110011011011011001101101101100880110110110011011011011001101101101100000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
1101101101100110110110110011011088011001101108801100880880cc01100880880cc0cc00cc0880cc08800cc0880cc08800000000000000000000000000
|
1101101101100110110110110011011088011001101108801100880880cc01100880880cc0cc0011011011011001101101101100000000000000000000000000
|
||||||
1101101101100110110110110011011088011001101108801100880880cc01100880880cc0cc00cc0880cc08800cc0880cc08800000000000000000000000000
|
1101101101100110110110110011011088011001101108801100880880cc01100880880cc0cc0011011011011001101101101100000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
110110110110011011011011001101101101100110110cc01100cc01101101100cc01101101100110cc08801100cc0cc08808800000000000000000000000000
|
110110110110011011011011001101101101100110110cc01100cc01101101100cc01101101100110cc08801100cc0cc08808800000000000000000000000000
|
||||||
110110110110011011011011001101101101100110110cc01100cc01101101100cc01101101100110cc08801100cc0cc08808800000000000000000000000000
|
110110110110011011011011001101101101100110110cc01100cc01101101100cc01101101100110cc08801100cc0cc08808800000000000000000000000000
|
||||||
|
|
|
@ -2,8 +2,8 @@ local Board = {}
|
||||||
function Board.new()
|
function Board.new()
|
||||||
local debug = false
|
local debug = false
|
||||||
|
|
||||||
local width = 4 -- tiles
|
local width = board_size -- tiles
|
||||||
local tile_width = 10 -- pixels
|
local tile_width = 8 -- pixels
|
||||||
local padding = 1
|
local padding = 1
|
||||||
local tiles = {}
|
local tiles = {}
|
||||||
local locked = {} -- list of indexes
|
local locked = {} -- list of indexes
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
local amplitude = 128
|
local amplitude = 128
|
||||||
local mouse_x = 0
|
local mouse_x = 0
|
||||||
local mouse_y = 0
|
local mouse_y = 0
|
||||||
|
local board_size = 8
|
||||||
|
|
||||||
--
|
--
|
||||||
-- constants
|
-- constants
|
||||||
|
|
|
@ -19,7 +19,7 @@ function state_menu()
|
||||||
make_button({
|
make_button({
|
||||||
x=10, y=10+k*10, w=200,
|
x=10, y=10+k*10, w=200,
|
||||||
text=item[1], data={i=2},
|
text=item[1], data={i=2},
|
||||||
on_click=function() set_state(states.rules) end,
|
on_click=function() board_size=item[2] set_state(states.loading) end,
|
||||||
on_hover=function(btn) selected=k+1 end,
|
on_hover=function(btn) selected=k+1 end,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user