From: JC Date: Mon, 31 Jul 2023 02:46:50 +0000 (-0500) Subject: Double cell count, make cell size const X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=c0c9df9fc2bfbec139d1b4f2929160c290fed4a9;p=life-pd.git Double cell count, make cell size const --- 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