AlefeChorna / mars-rover

Send commands to robotic rovers and receive final coordinates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mars Rover

Send commands to robotic rovers and receive final coordinates.

Requirements:

  • Node.js 16

Install

$ npm install

Testing

$ npm run test

Usage

const { sendCommands } = require("./src/send-commands.js");

const finalCoordinates = sendCommands(`1 2 N\nLMLMLMLMM\n3 3 E\nMRRMMRMRRM`);

console.log(finalCoordinates);
// 1 3 N
// 2 3 S

About

Send commands to robotic rovers and receive final coordinates.


Languages

Language:JavaScript 99.1%Language:Shell 0.9%