A small repository for playing with:
- Domain Driven Development.
- Software Testing.
- Parser Combinators.
OSX: ./start.sh
Windows: dotnet run --project src/ToyRobot/ToyRobot.fsproj
OSX (Watch for changes): ./test.sh
Windows: dotnet test
or for expecto
output: dotnet watch --project ./src/Test/Test.fsproj run
All commands are case-insensitive.
PLACE X,Y,DIRECTION
MOVE
LEFT
RIGHT
REPORT
QUIT
Command Parsing is implemented with FParsec
.
This allows for reporting of more advanced parse errors and suggestions:
> Place 1,
"Error in Ln: 1 Col: 10
Place 1,
^
Note: The error occurred at the end of the input stream.
Expecting: integer number (32-bit, signed)
"
- The robot cannot be placed outside of the specified bounds (defaults to 5x5).
- The robot will stop reacting to input once it has reached the edge of the table.