/ascii-amazement

Maze solver.

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

ASCII A-maze-ment

Solution to ITA Software's "ASCII A-maze-ment" puzzle.

It solves ASCII mazes like this:

alt text

Its output looks like:

alt text

Implementation walkthrough

Explananation here.

Usage

Get help:

~/ascii-amazement$ lein run -- -h
 Switches      Default  Desc
 --------      -------  ----
 -h, --help    false    Show help
 -i, --input   false    Input maze path
 -o, --output  false    Output maze path 

Solve one of ITA's sample puzzles; save it to test-output.txt:

~/ascii-amazement$ lein run -- -i resources/mazes/input1.txt -o test-output.txt

Check that a solution is identical to ITA's solution:

~/ascii-amazement$ lein run -- -i resources/mazes/input6.txt -o test-output.txt && \
                   diff test-output.txt resources/mazes/output6.txt

Run unit-tests:

~/ascii-amazement$ lein midje
All checks (8) succeeded.

License

Copyright © 2013 Tj Gabbour

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.