This will be useful later for determining live/deadness
for i=1, 10 do
rects[i] = {}
for j=1, 10 do
- rects[i][j] = pd.geometry.rect.new(32 * (i-1), 32 * (j-1), 32, 32)
+ r = pd.geometry.rect.new(32 * (i-1), 32 * (j-1), 32, 32)
+ rects[i][j] = { rect = r }
end
end
function playdate.update()
for i,row in ipairs(rects) do
for j,r in ipairs(row) do
- gfx.drawRect(r)
+ gfx.drawRect(r.rect)
end
end
if playdate.buttonJustPressed("a") then