* Join two loops into one.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 20:55:12 +0000 (22:55 +0200)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 20:55:12 +0000 (22:55 +0200)
ABM2/Playground.cpp

index 9f66d7286a4c530701df977b9170b542f6ef23e0..ef34150251d1d2b02055b82743d55af86dc2019f 100755 (executable)
@@ -71,13 +71,6 @@ bool Playground::Start()
        #endif\r
        // init playing field\r
        SchemeReader *scheme = new SchemeReader("Data/schemes/BASIC.SCH");\r
-       for (int i=0; i<PLAYGROUND_COLS; ++i) \r
-       {\r
-               for (int j=0; j<PLAYGROUND_ROWS; ++j)\r
-               {\r
-                       field[i][j] = NULL;\r
-               }\r
-       }\r
 \r
        CMMPointer<Sprite> tile_sprite = this->getKernel()->getSpriteManager()->getSprite(SPR_TILE);\r
        // put in non-destructible blocks\r
@@ -96,6 +89,8 @@ bool Playground::Start()
                        }\r
                        if (subsprite != -1)\r
                                field[i][j] = new Tile(tile_sprite, subsprite, i, j);\r
+                       else\r
+                               field[i][j] = NULL;\r
                }\r
        }\r
 /*\r