The application is a simulation of a toy robot moving on a square table top.
After setup, run the command line program with the command
toyrobot
The following commands are permitted:
PLACE X,Y,F
MOVE
LEFT
RIGHT
REPORT
F
is a direction, one of
NORTH
WEST EAST
SOUTH
The southwest corner of the tabletop is at X,Y = 0,0
.
The robot is constrained to move within the table (X,Y โ [0..4]
)
Install Python 3.6+, clone this repository, and run this in the root folder:
pip install -e .
To run tests, use:
pip install pytest
pytest
For stderr
logging of the problems with invalid commands, run with the -v
switch.
For a code coverage report, use:
pip install pytest-cov
pytest --cov=toyrobot --cov-report html:cov_html