Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zudov/eller-maze-generator
Generates mazes using Eller's algorythm
https://github.com/zudov/eller-maze-generator
Last synced: 12 days ago
JSON representation
Generates mazes using Eller's algorythm
- Host: GitHub
- URL: https://github.com/zudov/eller-maze-generator
- Owner: zudov
- Created: 2013-06-16T15:07:57.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-16T02:40:30.000Z (about 10 years ago)
- Last Synced: 2023-05-23T04:15:47.937Z (over 1 year ago)
- Language: Haskell
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Eller's Algorithm for maze generation
=====================================
**WARNING**: THIS CODE IS HORRIBLE, H-O-R-R-I-B-L-E. I wrote it when I was a very newbie at haskell. Please, learn no Haskell from it. And please, do not judge my haskell/coding foo based on code in that repo. I gonna refactor^W rewrite that code soon, it's in my DO-SOME-OTHER-DAY list.This is my implementation of algorythm which is described [here](http://www.neocomputer.org/projects/eller.html). It creates perfect mazes, here are few examples:
Small 5x5 maze:
_______________
|___ |______ |
| | | |___ |
| |___ __| |
| | |___ ___|
|___ __| |
| __|_____| |
|_______________|Bigger 10x10 maze:
______________________________
| | |___ __|___ |___ | |
| | | | |___ _____| | |
| | | | |______ ___|
|___ __|__| | |___ | |
| | |______ |__| _________|
| | | __|___ | ___ | |
| | | | | | | |__| |
|_________ |__|__| | | |
| ______ __|___ | |
| | _____|__|__|___ |__| |
| | | | | | __| |
|__|___________|__|____________|To build it run "cabal install".
╭─user@localhost ~/haskell
╰─$ cd eller_maze_generator
╭─user@localhost ~/haskell/eller_maze_generator ‹master*›
╰─$ cabal install
Resolving dependencies...
Configuring mazeGen-0.1...
Building mazeGen-0.1...
Preprocessing executable 'mazeGen' for mazeGen-0.1...
[1 of 1] Compiling Main ( mazeGen.hs, dist/build/mazeGen/mazeGen-tmp/Main.o )
Linking dist/build/mazeGen/mazeGen ...
Installing executable(s) in /home/user/.cabal/bin
Installed mazeGen-0.1mazeGen takes one argument which is size of algorythm.
╭─user@localhost ~/haskell/eller_maze_generator ‹master*›
╰─$ ~/.cabal/bin/mazeGen 4
____________
| | | | |
| | | | |
| _____| |
| ___ | |
| |___ |
|__|_____|___|