
1980. Pac-Man was built to run forever: no ending, no final boss, just faster ghosts. But reach board 256 and the right half of the maze detonates into a soup of letters, numbers and garbage tiles. That is the famous kill screen, and reaching it means surviving 255 perfect boards, so almost nobody ran into it during a normal game. The whole thing comes down to one byte that could not count past 255. Did you know the bug was sitting there, waiting at level 256, the entire time?
Objective
Return the level Pac-Man's 8-bit counter shows, and flag the kill screen.
Steps
$ displayed_level(255)
255
$ displayed_level(256)
-1
$ displayed_level(257)
1
Expected files
Allowed functions
None. Write every helper yourself.
Loading solutions...