You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.2 KiB
Plaintext

.__ __ .__
| |__ __ __ _____ _____ ____ ____ ____ _____ ______ __ ___/ |_|__| ____ ____
| | \| | \/ \\__ \ / \ _/ ___\/ _ \ / \\____ \| | \ __\ |/ \ / ___\
| Y \ | / Y Y \/ __ \| | \ \ \__( <_> ) Y Y \ |_> > | /| | | | | \/ /_/ >
|___| /____/|__|_| (____ /___| / \___ >____/|__|_| / __/|____/ |__| |__|___| /\___ /
\/ \/ \/ \/ \/ \/|__| \//_____/
. . . . . . . . . . . . . . . ╓ WALL LIST ╖
╟ ╢
. . . . . . . . . . . . . . . ╟ ╢
╟ ╢
. . . . . . . . . . . . . . . ╟ ╢
╟ ╢
. . . . . . . . . . . . . . . ╟ ╢
╟ ╢
. . . . . . . . . . . . . . . ╟ ╢
╟ ╢
. . . . . . . . . . . . . . . ╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╟ ╢
╔═══════════════════════════╗ ╟ ╢
║Randomized Prim's Algorithm║ ╟ ╢
╚═══════════════════════════╝ ╟ ╢
╟ ╢
- Start with a grid full of walls. ╟ ╢
╟ ╢
- Pick a cell, mark it as part of the maze. ╟ ╢
Add the walls of the cell to the wall list. ╟ ╢
╟ ╢
- While there are walls in the list: ╙ ╜
- Pick a random wall from the list.
If only one of the cells that the wall
divides is visited, then:
- Make the wall a passage and mark
the unvisited cell as part of
the maze.
- Add the neighboring walls of the
cell to the wall list.
- Remove the wall from the list.
,. ( . ) . "
(" ) )' ,' ) . (` '`
.; ) ' (( (" ) ;(, (( ( ;) " )"
_"., ,._'_.,)_(..,( . )_ _' )_') (. _..( '..jb
ASCII font "Graffiti" http://patorjk.com/software/taag/
Randomized Prim's Algorithm from
https://en.wikipedia.org/wiki/Maze_generation_algorithm
Based on Orestis Zekai's maze generator
https://medium.com/swlh/fun-with-python-1-maze-generator-931639b4fb7e
ASCII fire by jb https://hopemoji.com/text-art-ascii/fire/
Made in the context of Special Issue 17: Productive Play
XPUB™