Mars rover problem solution
The architecture was based on clean architecture
Use the npm to install dependencies.
npm installIt uses the input.txt file to get the instructions, following the pattern of the problem description, which is:
{integer} {integer} // plateau size
{integer} {integer} {N,S,E,W} // rover initial position
{M,L,R}{M,L,R}...{M,L,R} //rover instructions
{integer} {integer} {N,S,E,W} // rover initial position
{M,L,R}{M,L,R}...{M,L,R} //rover instructions
...
{integer} {integer} {N,S,E,W} // rover initial position
{M,L,R}{M,L,R}...{M,L,R} //rover instructions
It generates an output.txt file with the results
If you want to start with typescript, you can use
npm run devIf you want to transpile and run on node, you can use
npm run build && npm run startTo run test suites, you can use
npm run test