Skip to content

Commit f2fac81

Browse files
committed
Update WorldModel.java
1 parent 061e1cc commit f2fac81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/blocks-world/BlocksEnv/WorldModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,16 @@ static WorldModel world4() throws Exception {
155155
void modelToGrid() {
156156
for (int i=0; i<GWidth; i++) {
157157
for (int j=0; j<GHeight-1; j++) {
158-
model.data[i][j] = 0;
158+
model.set(0, i, j);
159159
model.names[i][j] = "";
160160
}
161-
model.data[i][GHeight-1] = TABLE;
161+
model.set(TABLE, i, GHeight-1);
162162
model.names[i][GHeight-1] = "table";
163163
}
164164
int i=0;
165165
for (Stack<String> s : stackList) {
166166
for (int j=1; j<s.size(); j++) {
167-
model.data[i*2+1][GHeight-j-1] = BLOCK;
167+
model.set(BLOCK, i*2+1, GHeight-j-1);
168168
model.names[i*2+1][GHeight-j-1] = s.get(j);
169169
}
170170
i++;

0 commit comments

Comments
 (0)