Windows Forms application for path following algorithm for ASCII maps
- .Net Framework 4.5.2
- Visual Studio
- Windows OS
- Open solution in Visual studio
- Build solution
- Run application
- Click button "Add ASCII map"
- Select ASCII map (.txt) file from your drive
- Click button "Process map"
- Result is shown in "Path" and "Letters" textboxes
Application input is ASCII map in format like this or similar:
@---+
B
K-----|--A
| | |
| +--E |
| | |
+--E--Ex C
| |
+--F--+
Symbol "@" represents starting point of the path, symbol "x" represents end of the path. Idea is to follow path from start to end and during that save chars which are on the path and also save chars which are uppercase letters (letters are only saved at first run, if letter is crossed second time it shouldn't be saved). Symbol "+" represents change of direction, but uppercase letter can also change direction of the path.
For the given input, expected result should be:
Path: @---+B||E--+|E|+--F--+|C|||A--|-----K|||+--E--Ex
Letters: BEEFCAKE
Basic unit tests are included in solution. They can be run from Test Explorer in Visual Studio.