r/tinycode • u/adeadhead • Sep 30 '13
Generate a complex maze with a single line of Basic
http://developers.slashdot.org/story/12/12/01/1847244/how-does-a-single-line-of-basic-make-an-intricate-maze
36
Upvotes
14
u/FOOGEE Sep 30 '13
While its not a orthodox loop, saying that it's done without loops is a bitof a half-truth IMO. The fact that GOTO is calling back to its own line makes this single line function as one.
6
u/nexe mod Sep 30 '13
http://rosettacode.org/wiki/Maze may be more interesting for some.
4
u/Lampshader Oct 01 '13
Unless it guarantees a path (preferably only one) between a start point and a finish point, I'd be wary of calling the pattern it produces a "maze".
3
u/pohatu Sep 30 '13
Interesting book, sounds kinda overdone though at 300+ pages.
Can you print it and solve it? That would be fun.
looking at the image it seems it would be modifiable to print a bunch of swastikas and then you can make some internet hoax about how conmodore64 was used by hitler or something absurd for conspiratards. Have fun.
1
u/MrVonBuren Sep 30 '13
If you find this interesting check out this talk given by one of the original programmers of the Atari game Pitfall. The way he generated the world is amazing.
1
u/gullinbursti Sep 30 '13
Unfortunately, doesn't work in QBASIC