Show HN: Maze Generation Visualization(github.com)
github.com
Show HN: Maze Generation Visualization
https://github.com/pakastin/maze
19 comments
> gcc: error: unrecognized command-line option ‘-fwritable-strings’; did you mean ‘-Wwrite-strings’?
this doesn't work with gcc 4
> GCC no longer accepts the -fwritable-strings option. Use named character arrays when you need a writable string.
https://gcc.gnu.org/gcc-4.0/changes.html
this doesn't work with gcc 4
> GCC no longer accepts the -fwritable-strings option. Use named character arrays when you need a writable string.
https://gcc.gnu.org/gcc-4.0/changes.html
Clang still accepts -fwritable-strings.
For gcc, writable strings can be avoided by making the top line one character longer:
For gcc, writable strings can be avoided by making the top line one character longer:
char M[3],A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf("%d",&C);Really neat. There was a maze generation algorithm in BASIC when I was younger that created the maze one row at a time. I couldn't wrap my head around how it was possible to make a maze like that. Searched for it recently and found Eller's algorithm: https://weblog.jamisbuck.org/2010/12/29/maze-generation-elle...
My three different versions I did long time ago in Perl: https://github.com/xa-bi/mazes
Cool!
If you're into maxes and coding you should check out: http://www.mazesforprogrammers.com/
Also the blog from the book author, with visualizations and separate blog posts for several different maze generation algorithms: http://weblog.jamisbuck.org/2011/2/7/maze-generation-algorit...
For whoever has kids, krazy dad makes some easy to print maze booklets with mazes to be solved. There’s a lot of other goodies on that site as well.
https://krazydad.com/mazes/index.php?fmt=EZ
https://krazydad.com/mazes/index.php?fmt=EZ
Here's a Python one, with a UI, cli, and a lovely 3blue1brown visualization in the readme.
https://github.com/will2dye4/labyrinth
https://github.com/will2dye4/labyrinth
How about in Atari 800 BASIC with sound...
https://www.youtube.com/watch?v=Yf_OPNQA1-4
https://www.youtube.com/watch?v=Yf_OPNQA1-4
That was a-mazing SCNR
this is great, just printed out two for my kids to do, that'll keep them quiet for a bit.
If you want more quiet time from your kids print out some mazes from crazy dad, they have different levels of difficulty and come in bundles.
https://krazydad.com/mazes/index.php?fmt=EZ
https://krazydad.com/mazes/index.php?fmt=EZ
with -fwritable-strings -Wno-implicit-function-declaration and watch a maze of the input height being generated on the fly.