local pd <const> = playdate
local gfx <const> = playdate.graphics
-local WIDTH <const> = 12
-local HEIGHT <const> = 7
+local WIDTH <const> = 24
+local HEIGHT <const> = 14
+local CELL_SIZE <const> = 16
-- Convenience function for iterating over 8 neighbors
function neighbors(g1, x, y)
for i=1, WIDTH do
cells[i] = {}
for j=1, HEIGHT do
- r = pd.geometry.rect.new(32 * (i-1), 32 * (j-1), 32, 32)
+ r = pd.geometry.rect.new(CELL_SIZE * (i-1), CELL_SIZE * (j-1), CELL_SIZE, CELL_SIZE)
cells[i][j] = { cell = r, live = false }
end
end