What happens if you enter 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 into a Commodore 64 and run it?
This one line of code simply alternates randomly between two characters, creating a "random" maze or labyrinth. The fun thing is though that the random number generator will always produce the exact same sequence of random numbers after every boot, so every single Commodore 64 will produce the exact same maze if this is run directly after a reset.
If you pass a 0 instead of a positive or negative number as parameter to RND(), the random number generator will be seeded from the internal TOD clock which uses the AC-mains frequency to count time since the computer was powered up. That would result in mazes that are more different each time it is run.
Ещё видео!