Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robot-simulator: apply "input" policy #1163

Merged
merged 2 commits into from
Jan 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions exercises/robot-simulator/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exercise": "robot-simulator",
"version": "2.0.0",
"version": "2.1.0",
"comments": [
"Some tests have two expectations: one for the position, one for the direction",
"Optionally, you can also test",
Expand All @@ -15,7 +15,7 @@
{
"description": "Robots are created with a position and direction",
"property": "create",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -33,7 +33,7 @@
{
"description": "Negative positions are allowed",
"property": "create",
"robot": {
"input": {
"position": {
"x": -1,
"y": -1
Expand All @@ -56,7 +56,7 @@
{
"description": "does not change the position",
"property": "turnRight",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -73,7 +73,7 @@
{
"description": "changes the direction from north to east",
"property": "turnRight",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -87,7 +87,7 @@
{
"description": "changes the direction from east to south",
"property": "turnRight",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -101,7 +101,7 @@
{
"description": "changes the direction from south to west",
"property": "turnRight",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -115,7 +115,7 @@
{
"description": "changes the direction from west to north",
"property": "turnRight",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -134,7 +134,7 @@
{
"description": "does not change the position",
"property": "turnLeft",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -151,7 +151,7 @@
{
"description": "changes the direction from north to west",
"property": "turnLeft",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -165,7 +165,7 @@
{
"description": "changes the direction from west to south",
"property": "turnLeft",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -179,7 +179,7 @@
{
"description": "changes the direction from south to east",
"property": "turnLeft",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -193,7 +193,7 @@
{
"description": "changes the direction from east to north",
"property": "turnLeft",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -212,7 +212,7 @@
{
"description": "does not change the direction",
"property": "advance",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -226,7 +226,7 @@
{
"description": "increases the y coordinate one when facing north",
"property": "advance",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -243,7 +243,7 @@
{
"description": "decreases the y coordinate by one when facing south",
"property": "advance",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -260,7 +260,7 @@
{
"description": "increases the x coordinate by one when facing east",
"property": "advance",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -277,7 +277,7 @@
{
"description": "decreases the x coordinate by one when facing west",
"property": "advance",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -299,7 +299,7 @@
{
"description": "instructions to move west and north",
"property": "instructions",
"robot": {
"input": {
"position": {
"x": 0,
"y": 0
Expand All @@ -318,7 +318,7 @@
{
"description": "instructions to move west and south",
"property": "instructions",
"robot": {
"input": {
"position": {
"x": 2,
"y": -7
Expand All @@ -337,7 +337,7 @@
{
"description": "instructions to move east and north",
"property": "instructions",
"robot": {
"input": {
"position": {
"x": 8,
"y": 4
Expand Down