Skip to content

Commit 63319ea

Browse files
committed
Change Sample Input to actual input
1 parent 0b0a291 commit 63319ea

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

README.md

+24-17
Original file line numberDiff line numberDiff line change
@@ -152,26 +152,33 @@ Note that the Block World interpreter will automatically output the initial and
152152
<a name="program" />
153153
## Sample Program:
154154
```
155-
WORLD proj2(5,5):
155+
/**
156+
Dylan Jager-Kujawa and Matt Richardson
157+
Block World Sample Input
158+
*/
159+
160+
WORLD proj2(5,6): // Declare world with dimensions 5x5
156161
BLOCKS {
157-
var1(1,1);
158-
var2(1,2);
159-
var3(2,4);
160-
arm();
162+
var1(1,1); // var1 declaration
163+
var2(1,2); // var2 declaration
164+
var3(2,4); // var3 declaration
165+
arm(); // Default arm location = (1,1)
161166
};
162167
MOVES [
163-
MOVE(1,1);
164-
GRAB(var1);
165-
MOVE(2,2);
166-
DROP;
167-
MOVE(1,2);
168-
GRAB(var2);
169-
MOVE(2,2);
170-
STACK;
171-
//Errors:
172-
UNSTACK(var1); //ERROR: var 1 not at top of stack
173-
MOVE(6,5); //ERROR: (6,5) not located within proj2
174-
DROP; //ERROR: not holding anything
168+
MOVE(1,1); // Move arm to (1,1) (unnecessary)
169+
GRAB(var1); // Pickup var1
170+
MOVE(2,2); // Move arm to (2,2)
171+
DROP; // Drop var1
172+
MOVE(1,2); // Move arm to (1,2)
173+
GRAB(var2); // Pickup var2
174+
MOVE(2,2); // Move arm to (2,2)
175+
STACK; // Stack var2 on var1
176+
/*
177+
Errors:
178+
UNSTACK(var1); //ERROR: var 1 not at top of stack
179+
MOVE(6,5); //ERROR: (6,5) not located within proj2
180+
DROP; //ERROR: not holding anything
181+
*/
175182
];
176183
```
177184

0 commit comments

Comments
 (0)