package com.example.jacek.streamthegame;

import java.util.ArrayList;

/**
 * Created by jacek on 1/5/2016.
 */
public class LevelProvider {
    public LevelDefinition getLevel(int level) {
        switch (level) {
            case 1:
                return defaultLevel();
                //break;
            default: return defaultLevel();
        }
    }

    private LevelDefinition defaultLevel() {
        int nRows = 7;
        int nCols = 10;
        ArrayList<GameObjectDefinition> objects = new ArrayList<>();
        objects.add(new GameObjectDefinition(Sprite.exit, 3, 8, 2));
        objects.add(new GameObjectDefinition(Sprite.enter, 3, 1, 2));
        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 1));
        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 3, 1));
        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 5));
        objects.add(new GameObjectDefinition(Sprite.bend2, 5, 7));
        return new LevelDefinition(nRows, nCols, objects);
    }
}

@@ -200,32 +200,96 @@
 witch (level) %7B%0A
+            case 0:%0A                return this.debugLevel_2();%0A
             case
@@ -1067,11 +1067,1362 @@
 );%0A    %7D
+%0A%0A    // section of levels for debugging purposes%0A    private LevelDefinition debugLevel_1() %7B%0A        int nRows = 7;%0A        int nCols = 10;%0A        ArrayList%3CGameObjectDefinition%3E objects = new ArrayList%3C%3E();%0A        objects.add(new GameObjectDefinition(Sprite.exit, 3, 1, 4));%0A        objects.add(new GameObjectDefinition(Sprite.enter, 3, 8, 4));%0A        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 1));%0A        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 3, 1));%0A        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 5));%0A        objects.add(new GameObjectDefinition(Sprite.bend2, 5, 7));%0A        return new LevelDefinition(nRows, nCols, objects);%0A    %7D%0A%0A    private LevelDefinition debugLevel_2() %7B%0A        int nRows = 7;%0A        int nCols = 10;%0A        ArrayList%3CGameObjectDefinition%3E objects = new ArrayList%3C%3E();%0A        objects.add(new GameObjectDefinition(Sprite.exit, 0, 5, 1));%0A        objects.add(new GameObjectDefinition(Sprite.enter, 5, 5, 1));%0A        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 1));%0A        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 3, 1));%0A        objects.add(new GameObjectDefinition(Sprite.short_pipe, 1, 5));%0A        objects.add(new GameObjectDefinition(Sprite.exit, 5, 0));%0A        return new LevelDefinition(nRows, nCols, objects);%0A    %7D
 %0A%7D%0A

debug levels in level provider