Skip to content

Latest commit

 

History

History
80 lines (51 loc) · 2.25 KB

File metadata and controls

80 lines (51 loc) · 2.25 KB

robot-challenge

Problem statement: https://github.com/ioof-holdings/recruitment/wiki/Robot-Challenge

Install dependencies

Run npm install to install dependencies

Run tests

Run npm run test to run the tests. The test would run in watch mode.

Run linter

Run npm run linter to check for linter errors and warnings.

How to run program

Mode A - Manual input

Usage: npm start and input commands on prompt PLACE X,Y,F MOVE LEFT RIGHT REPORT example: PLACE 0,0,NORTH LEFT REPORT

Mode B - Automated input

npm run start .\automation\inputs.txt

####Understanding application structure

  • index.ts is root of the application.
  • enums defines enums for commands and robot movements.
  • interfaces defines blueprint for robots movement and postion on board.
  • movements handler for robot movements and commands on board.
  • robotPlayer defines robot player and control movement on board.
  • simulator defines all the rules for simulation.
  • table initialises table top with defined values.
  • constraints set position boundaries.

The following resources detail how the configurations in this repo were determined:

Configs

Actions

ToDo:

  • Support multiple robots.
  • Board columns and rows can be set with user input.
  • Graphical user interface