Skip to content

Commit 8aaf653

Browse files
committed
* Eliminate redundancy in instructions.
* Eliminate confusing language about constrained rooms of different sizes, appears to have been legacy text irrelevant to this problem. * Eliminate step headers (also legacy?). * Clarify that coordinates increase when moving north and east.
1 parent 236cd42 commit 8aaf653

File tree

1 file changed

+3
-42
lines changed

1 file changed

+3
-42
lines changed

robot-simulator.md

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,19 @@
1-
## Step 1
1+
A robot factory's test facility needs a program to verify robot movements.
22

3-
The robot factory manufactures robots that have three possible
4-
movements:
3+
The robots have three possible movements:
54

65
- turn right
76
- turn left
87
- advance
98

109
Robots are placed on a hypothetical infinite grid, facing a particular
1110
direction (north, east, south, or west) at a set of {x,y} coordinates,
12-
e.g., {3,8}.
13-
14-
## Step 2
15-
16-
Robots can pivot left and right.
17-
18-
The robot factory manufactures robots that have three possible
19-
movements:
20-
21-
- turn right
22-
- turn left
23-
- advance
24-
25-
The factory's test facility needs a program to verify robot movements.
26-
27-
There are a number of different rooms of varying sizes, measured in
28-
Robot Units, the distance a robot moves when you instruct it to
29-
`advance`.
30-
31-
The floor of the room is a grid, each square of which measures 1 square
32-
RU (Robot Unit).
33-
34-
The rooms are always oriented so that each wall faces east, south, west,
35-
and north.
36-
37-
The test algorithm is to place a robot at a coordinate in the room,
38-
facing in a particular direction.
11+
e.g., {3,8}, with coordinates increasing to the north and east.
3912

4013
The robot then receives a number of instructions, at which point the
4114
testing facility verifies the robot's new position, and in which
4215
direction it is pointing.
4316

44-
## Step 3
45-
46-
The robot factory manufactures robots that have three possible
47-
movements:
48-
49-
- turn right
50-
- turn left
51-
- advance
52-
53-
The robot factory's test facility has a simulator which can take a
54-
string of letters and feed this into a robot as instructions.
55-
5617
- The letter-string "RAALAL" means:
5718
- Turn right
5819
- Advance twice

0 commit comments

Comments
 (0)