TheSecretSquad / toyrobotsimulator

0 stars 0 forks source link

Toy Robot Simulation

Toy robot simulation designed using east oriented code:

Description

Constraints

The toy robot must not fall off the table during movement.

This also includes the initial placement of the toy robot.

Any move that would cause the robot to fall must be ignored.

Example Input and Output

PLACE 0,0,NORTH
MOVE
REPORT

Output: 0,1,NORTH

PLACE 0,0,NORTH
LEFT
REPORT

Output: 0,0,WEST

PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT

Output: 3,3,NORTH