|
1 | 1 | { |
2 | 2 | "exercise": "robot-simulator", |
3 | | - "version": "3.1.0", |
| 3 | + "version": "3.2.0", |
4 | 4 | "comments": [ |
5 | 5 | "Some tests have two expectations: one for the position, one for the direction", |
6 | 6 | "Optionally, you can also test", |
|
10 | 10 | ], |
11 | 11 | "cases": [ |
12 | 12 | { |
13 | | - "description": "A robot is created with a position and a direction", |
| 13 | + "description": "Create robot", |
14 | 14 | "cases": [ |
15 | 15 | { |
16 | | - "description": "Robots are created with a position and direction", |
| 16 | + "description": "at origin facing north", |
17 | 17 | "property": "create", |
18 | 18 | "input": { |
19 | 19 | "position": { |
|
31 | 31 | } |
32 | 32 | }, |
33 | 33 | { |
34 | | - "description": "Negative positions are allowed", |
| 34 | + "description": "at negative position facing south", |
35 | 35 | "property": "create", |
36 | 36 | "input": { |
37 | 37 | "position": { |
|
51 | 51 | ] |
52 | 52 | }, |
53 | 53 | { |
54 | | - "description": "rotates the robot's direction 90 degrees clockwise", |
| 54 | + "description": "Rotating clockwise", |
55 | 55 | "cases": [ |
56 | 56 | { |
57 | | - "description": "changes the direction from north to east", |
| 57 | + "description": "changes north to east", |
58 | 58 | "property": "move", |
59 | 59 | "input": { |
60 | 60 | "position": { |
|
73 | 73 | } |
74 | 74 | }, |
75 | 75 | { |
76 | | - "description": "changes the direction from east to south", |
| 76 | + "description": "changes east to south", |
77 | 77 | "property": "move", |
78 | 78 | "input": { |
79 | 79 | "position": { |
|
92 | 92 | } |
93 | 93 | }, |
94 | 94 | { |
95 | | - "description": "changes the direction from south to west", |
| 95 | + "description": "changes south to west", |
96 | 96 | "property": "move", |
97 | 97 | "input": { |
98 | 98 | "position": { |
|
111 | 111 | } |
112 | 112 | }, |
113 | 113 | { |
114 | | - "description": "changes the direction from west to north", |
| 114 | + "description": "changes west to north", |
115 | 115 | "property": "move", |
116 | 116 | "input": { |
117 | 117 | "position": { |
|
132 | 132 | ] |
133 | 133 | }, |
134 | 134 | { |
135 | | - "description": "rotates the robot's direction 90 degrees counter-clockwise", |
| 135 | + "description": "Rotating counter-clockwise", |
136 | 136 | "cases": [ |
137 | 137 | { |
138 | | - "description": "changes the direction from north to west", |
| 138 | + "description": "changes north to west", |
139 | 139 | "property": "move", |
140 | 140 | "input": { |
141 | 141 | "position": { |
|
154 | 154 | } |
155 | 155 | }, |
156 | 156 | { |
157 | | - "description": "changes the direction from west to south", |
| 157 | + "description": "changes west to south", |
158 | 158 | "property": "move", |
159 | 159 | "input": { |
160 | 160 | "position": { |
|
173 | 173 | } |
174 | 174 | }, |
175 | 175 | { |
176 | | - "description": "changes the direction from south to east", |
| 176 | + "description": "changes south to east", |
177 | 177 | "property": "move", |
178 | 178 | "input": { |
179 | 179 | "position": { |
|
192 | 192 | } |
193 | 193 | }, |
194 | 194 | { |
195 | | - "description": "changes the direction from east to north", |
| 195 | + "description": "changes east to north", |
196 | 196 | "property": "move", |
197 | 197 | "input": { |
198 | 198 | "position": { |
|
213 | 213 | ] |
214 | 214 | }, |
215 | 215 | { |
216 | | - "description": "moves the robot forward 1 space in the direction it is pointing", |
| 216 | + "description": "Moving forward one", |
217 | 217 | "cases": [ |
218 | 218 | { |
219 | | - "description": "increases the y coordinate one when facing north", |
| 219 | + "description": "facing north increments Y", |
220 | 220 | "property": "move", |
221 | 221 | "input": { |
222 | 222 | "position": { |
|
235 | 235 | } |
236 | 236 | }, |
237 | 237 | { |
238 | | - "description": "decreases the y coordinate by one when facing south", |
| 238 | + "description": "facing south decrements Y", |
239 | 239 | "property": "move", |
240 | 240 | "input": { |
241 | 241 | "position": { |
|
254 | 254 | } |
255 | 255 | }, |
256 | 256 | { |
257 | | - "description": "increases the x coordinate by one when facing east", |
| 257 | + "description": "facing east increments X", |
258 | 258 | "property": "move", |
259 | 259 | "input": { |
260 | 260 | "position": { |
|
273 | 273 | } |
274 | 274 | }, |
275 | 275 | { |
276 | | - "description": "decreases the x coordinate by one when facing west", |
| 276 | + "description": "facing west decrements X", |
277 | 277 | "property": "move", |
278 | 278 | "input": { |
279 | 279 | "position": { |
|
294 | 294 | ] |
295 | 295 | }, |
296 | 296 | { |
297 | | - "description": "Where R = Turn Right, L = Turn Left and A = Advance, the robot can follow a series of instructions and end up with the correct position and direction", |
| 297 | + "description": "Follow series of instructions", |
| 298 | + "comments": [ "The robot can follow a series of instructions and end up with the correct position and direction.", |
| 299 | + "Where R = Turn Right, L = Turn Left and A = Advance" |
| 300 | + ], |
298 | 301 | "cases": [ |
299 | 302 | { |
300 | | - "description": "instructions to move east and north from README", |
| 303 | + "description": "moving east and north from README", |
301 | 304 | "property": "move", |
302 | 305 | "input": { |
303 | 306 | "position": { |
|
316 | 319 | } |
317 | 320 | }, |
318 | 321 | { |
319 | | - "description": "instructions to move west and north", |
| 322 | + "description": "moving west and north", |
320 | 323 | "property": "move", |
321 | 324 | "input": { |
322 | 325 | "position": { |
|
335 | 338 | } |
336 | 339 | }, |
337 | 340 | { |
338 | | - "description": "instructions to move west and south", |
| 341 | + "description": "moving west and south", |
339 | 342 | "property": "move", |
340 | 343 | "input": { |
341 | 344 | "position": { |
|
354 | 357 | } |
355 | 358 | }, |
356 | 359 | { |
357 | | - "description": "instructions to move east and north", |
| 360 | + "description": "moving east and north", |
358 | 361 | "property": "move", |
359 | 362 | "input": { |
360 | 363 | "position": { |
|
0 commit comments