From c0c9df9fc2bfbec139d1b4f2929160c290fed4a9 Mon Sep 17 00:00:00 2001 From: JC Date: Sun, 30 Jul 2023 21:46:50 -0500 Subject: [PATCH] Double cell count, make cell size const --- source/main.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/main.lua b/source/main.lua index 0b94cc8..62891be 100644 --- a/source/main.lua +++ b/source/main.lua @@ -1,8 +1,9 @@ local pd = playdate local gfx = playdate.graphics -local WIDTH = 12 -local HEIGHT = 7 +local WIDTH = 24 +local HEIGHT = 14 +local CELL_SIZE = 16 -- Convenience function for iterating over 8 neighbors function neighbors(g1, x, y) @@ -84,7 +85,7 @@ local cells = {} 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 -- 2.20.1