public void loop() { int i, j; // Draw 1st layer - the ground for (i = 0; i < 10; i++) { for (j = 0; j < 8; j++) { m.image(img[world[i][j]], 100 * i, 100 * j); } } // Draw 2nd layer - the structures. for (i = 0; i < 10; i++) { for (j = 0; j < 8; j++) { if (world[i][j] == HOUSE) { m.image(img[GRASS], 100 * i, 100 * j); m.image(img[HOUSE], 100 * i, 100 * j); } } } }