Hacker News new | ask | show | jobs
by unimpressive 5119 days ago
Encountered a bug: When I die, the game keeps counting score as my "dead" player keeps going across land behind the scenes.
1 comments

It's 219 bytes, it's not that clever! When you die it simply displays 'game over' along with incremented timer. Because the entire logic is inside a `setInterval` call it never gets stopped.

setInterval is set to update in 9 ms intervals - I assume because whilst it's probably more playable (easier) at higher intervals doing so would require additional bytes.