The application is a simulation of a toy robot moving on a square table top, of dimensions 5 units x 5 units. There are no other obstructions on the table surface. The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement commands must still be allowed.
F = NORTH, EAST, SOUTH, WEST
- PLACE X,Y,F
- MOVE
- LEFT
- RIGHT
- REPORT
PLACE 0,0,NORTH
Example: A
PLACE 0,0,NORTH
MOVE
REPORT
Output: 0,1,NORTH
Example: B
PLACE 0,0,NORTH
LEFT
REPORT
Output: 0,0,WEST
Example: C
PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
Output: 3,3,NORTH
The node.js version is build on typescript
Packages:
- @types/node
- jest
- ts-jest
- VS Code or Any Code Editor
- nodejs runtime
- Open project folder in vscode
- Open terminal the follow the [Command To Run steps]
- Open node.js root folder in the terminal
- Open terminal [Command To Run steps]
Step 1: Install NPM Packages ((node_modules))
npm install
// or this
npm i -D @types/jest @types/node typescript jest ts-jest
Step 2: Run the project and testing the project
//Please see packge.json file for reference
// Create a latest build
npm run build
// To start the project
npm run start
// To test the project using jest
npm run test
- Visual Studio 2019 or Higher
- .Net 7.0
- .Net 7.0 Runtime (To install dotnet cli)
- C# Devkit Extension
- Open solution project
- Click Run or Play Button
- Open Folder in VSCode
- In the terminal, enter command, dotnet run --project [location of start-up with csproj extension]
- Ex. dotnet run --project project/iress-challange.csproj
- Goto project location or root folder of the project
- enter command, dotnet run --project [location of start-up with csproj extension]
- Ex. dotnet run --project project/iress-challange.csproj
- Open solution project
- View Test Explorer
- Select Test and Click play in View Test Explorer