You can download the source code off github.
The original problem text:
ASCII Maze. Write a program that reads in a simple 2-D ASCII maze and outputs the same maze, but with the solution filled in.
The input is guaranteed to be a well-formed maze and to have a unique solution path from the bottom left grid cell to the top right grid cell. Your program should re-output the maze with the solution path filled in.
Input:
_______________________END
| | | |
|__ |_____ | ______|
| | | |
| ___ |_____ | |
| | | | | |
| | | ___ | | |
| | | | | | |
| |_____ |__|__|__| |
| | |
Start|__|____________________|
Output:
_______________________END
| | |XX XX XX|
|__ |_____ | ______|
|XX XX XX| XX| |
| ___ |_____ | |
|XX| |XX XX XX XX| | |
| | | ___ | | |
|XX| | | | | |
| |_____ |__|__|__| |
|XX| |
Start|__|____________________|

0 comments:
Post a Comment