- Read through the PROBLEM.md and prepare actors and their actions
- Prepare actor properties and their behaviours
- Added separate classes for actors and implemented the logic/solution
- Write unit tests and update the code as I cover for different scenarios
- Write console part without touching/modifying the actors, because they should obey Single Responsibility.
- Try to use as much self-explanatory names as I could.
- Also added PHPDocs wherever needed.
-
Unzip the folder and run
composer install
to install all the packages. -
Change
console
file permissions by running the following command:chmod 777 console
-
Make sure you have PHP 7.0+ installed to run this application.
-
All files related running robot simulation are placed under
src
-
Run
./console
to start the application. -
Give any of the following commands to continue the process:
- PLACE
- MOVE
- LEFT
- RIGHT
-
Run the following command when you want to see the robot location:
REPORT
- All tests are placed in
tests
folder. - Added all the use cases, including the three from PROBLEM.md
- Run
./vendor/bin/phpunit
(if PHPUnit isn't set in your path) to see the results.