Open a console and execute php bin/toy
, a prompt character (>
) will be shown.
Available command:
place x,y,face
will put the toy robot on the table in positionx
,y
and facingnorth
,south
,east
, orwest
. This command should called first before another command. You cannot place a toy robot beyond the barrier.move
will move the toy robot one unit forward in the direction it is currently facing.left
orright
will rotate the robot 90 degrees in the specified direction without changing the position of the robot.path
will give the path to take from the current position to a specific destination. e.g.path 0,1
q
Exit the prompt.
- Fork and clone this repo.
git clone [email protected]:pH-7/dinobot-on-tabletop-game.git
- Install all dependencies
composer install
- Install development tools using
phive
phive install
- Before commit the change, make sure there are no coding style or
phpstan
violations by executingvendor/bin/phpcs tools/phpstan analyse
- Run unit testing by executing
php bin/phpunit
- Unit testing coverage report
php bin/phpunit --coverage-text