end
function playdate.update()
+ if playdate.buttonJustPressed("b") then
+ running = not running
+ end
if not running then
-- automata state setup
+ pd.display.setRefreshRate(30)
draw(cells)
if playdate.buttonJustPressed("right") then
y = math.min(HEIGHT, y + 1)
elseif playdate.buttonJustPressed("a") then
cells[x][y].live = not cells[x][y].live
- elseif playdate.buttonJustPressed("b") then
- running = true
end
else
-- running
+ -- Make running less epileptic while letting interaction remain smooth
+ pd.display.setRefreshRate(2)
draw(cells)
cells = generation(cells)
end