local rects = {}
for i=1, 10 do
- rects[i] = pd.geometry.rect.new(32 * (i-1), 32 * (i-1), 32, 32)
+ rects[i] = {}
+ for j=1, 10 do
+ rects[i][j] = pd.geometry.rect.new(32 * (i-1), 32 * (j-1), 32, 32)
+ end
end
function playdate.update()
- for i,r in ipairs(rects) do
- gfx.drawRect(r)
+ for i,row in ipairs(rects) do
+ for j,r in ipairs(row) do
+ gfx.drawRect(r)
+ end
end
if playdate.buttonJustPressed("a") then
playdate.display.setInverted(not playdate.display.getInverted())