MaydayGD / textmaze

generates mazes with box drawing characters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Like this:

╭───┬──┬─┬───┬────┬──┬┬─┬┬┬┬──┬───┬───┬─┬┬─┬┬┬─┬──┬┬┬────┬──╮
├╴╷╶╯╭─┴╴╵╶─┬┴╮╷╭╴│╶╮│╵╷│╵╵╵╭┬╯╭──┴╴╭─╯╷╵├╮│╵╰╴│╷╶┤╵╰─╴╶╮╵╷╶┤
├╴╰─╮│╭╮╶╮╭─┼╮╵├┴╮│╶┴╯╷│╰╴╶─┤│╷╰╴╭╴╶┼─┬┴╮╵╵├╮╶╮╵╰╮│╭┬──╮╰─┴┬┤
├─╮╶┼┤│╵╭┴╯╭┤╵╶┤╷├┴┬╮╭╯│╶─╮╶╯╰┼┬─┴─╮╵╭┴╮├╴╷╵├─╯╶┬┤╰╯├┬╴╵╭─╮││
├╴├╮│╰┤╶┼─╴╵│╭╮│╰╯╷╵├┼┬╯╭┬┼─┬─┤╵╶╮╷╵╷╰╮││╷├─╯╭─┬╯│╷╷╵╵╶╮│╭╯││
│╷╵│╰╴╰╮╰┬╴╷╰╯╵╰┬╴│╶┤╵╰╴│╵╵╶╯╭┴─┬┼┤╷├╴╵╵╰╯╰┬╮╵╶┤╷╰┼╯╷╷╷│╵╰┬╯│
├┴╴╰┬─╴├╴├─╯╶─┬─┤╭┴┬┼╴╶╮├─╮╭─┴╴╶┤╵╰┤╰╮╭─╴╷╭╯╵╷╷├┼╮╵╭╯├┼┴╴╶╯╷│
├──╮╰┬╴╰╮╵╶┬┬╮│╷│╵╷╵╵╶┬┴╯╭┤╰╴╭──┤╶─┴╴╰┼╴╷╰┤╷╶┼┤╵╵├╮│╷╵│╶╮╶┬┴┤
├╴╷│╶╯╷╶┤╶─╯╵│├╯╰─╯╭╮╷│╶╮╵│╷╭┼─╴╰╴╷╭╮╭┤╷├─┤├╮│╰╮╶┤╰┴╯╷├╴│╶┼╴│
│╭╯│╭─╯╶╯╶─╮╶┴┴──╮╶╯├╯╰╴╰╮├╯╵╵╶╮╶╮│╵╰┤╰┴┤╷├╯╰┤╶┼─┼┬╴╷│├╴╰─╯╭┤
├╯╶┴┼╮╭╴╭╮╷├──╮╶┬╯╷╶┴┬─╴╶┴╯╷╷╶╮├─┴┤╭─┴╴╷╰╯├─╴│╷╰╴│╵╷│╰┴╮╭─╴╵│
│╶──┤├┼─╯├┼┴─╴├╴╵╶┴┬─┼┬╴╶──┤│╭┤╵╭─╯│╭─┬┴╮╶┴╴╶┼┴╴╭┤╭╯├┬─╯├╴╭╴│
├┬╴╶┤│╰─╴│╰┬─╴╰╮╭──┴╴╵╵╶─┬─┴╯╵│╶┼╴╷├╯╶┤╶┼┬─╴╷│╭┬╯╵├┬╯╰╴╭┤╶┼─┤
│╵╶─╯╰┬╮╷│╶┴┬┬╴├╯╭───┬╮╭╮├┬──╴╰─┴╮├╯╶─╯╶┤╰┬╴╰┤╵╵╭╴│╰╮╭╴│╵╷╰╴│
│╭╴╭╴╶╯╵│╵╷╶╯╵╷╰─╯╷╭╮╵╵╵╰┤╰─╴╶┬┬┬╯╰╴╭╴╭╴├╴╵╭╴╰──╯╷│╭┴╯╷╰─┴┬╴│
├╯╶┤╶┬╴╷╰┬╯╶╮╷╰╮╷╶┴╯│╷╷╷╶┴╮╷╶─╯│╵╷╶─┤╶┤╶┴╴╷│╭──╴╷├╯╵╷╭╯╷╶╮│╶┤
╰──┴─┴─┴─┴──┴┴─┴┴───┴┴┴┴──┴┴───┴─┴──┴─┴───┴┴┴───┴┴──┴┴─┴─┴┴─╯

How to run:

This program should run on both recent versions of Python 2 and on Python 3. Start with:

./textmaze.py

or:

python textmaze.py

Optionally, you can adjust the size of the maze:

python textmaze.py 12 20

This script needs to output Unicode. If your Python is too afraid ("UnicodeEncodeError") then probably your terminal doesn't support Unicode, or doesn't advertise this capability. How does the output of:

cat README

look? Good? Then this:

PYTHONIOENCODING=UTF-8 python textmaze.py

will work for you.

About

generates mazes with box drawing characters


Languages

Language:Python 100.0%