I've created a constant dictionary for directions, to be sure, that L
and R
will refer to correct directions. First I split the command and then iterate through the movement commands.
Please, be understanding. I spent less time on this task because previous one took me a bit more 😄
- Open the project folder and run command yarn or npm install to install all dependencies.
- Run
execute
script with one string parameter e.g.yarn execute "4 4 NORTH LLAA"
.
- I would hermetize, separate logic
- Structure directories
- Add logic tests