This is a bit like snake!
gfx.drawRect(r.rect)
end
end
+
gfx.fillRect(rects[x][y].rect)
- if playdate.buttonJustPressed("a") then
- playdate.display.setInverted(not playdate.display.getInverted())
+
+ if playdate.buttonJustPressed("right") then
+ x = math.min(10, x + 1)
+ elseif playdate.buttonJustPressed("left") then
+ x = math.max(1, x - 1)
+ elseif playdate.buttonJustPressed("up") then
+ y = math.max(1, y - 1)
+ elseif playdate.buttonJustPressed("down") then
+ y = math.min(10, y + 1)
end
end