// Path: core/src/me/minidigger/projecttd/entities/Minion.java
// public class Minion {
// 
//     public static PooledEngine ENGINE;
//     public static Sprite SPRITE;
// 
//     public static Entity newMinion(Vector2 spawn) {
//         Entity entity = ENGINE.createEntity();
// 
//         SpriteComponent spriteComponent = ENGINE.createComponent(SpriteComponent.class);
//         spriteComponent.sprite = SPRITE;
//         entity.add(spriteComponent);
// 
//         VelocityComponent velocityComponent = ENGINE.createComponent(VelocityComponent.class);
//         entity.add(velocityComponent);
// 
//         TransformComponent transformComponent = ENGINE.createComponent(TransformComponent.class);
//         transformComponent.position = spawn;
//         entity.add(transformComponent);
// 
//         HealthComponent healthComponent = ENGINE.createComponent(HealthComponent.class);
//         healthComponent.health = 100;
//         entity.add(healthComponent);
// 
//         PathComponent pathComponent = ENGINE.createComponent(PathComponent.class);
//         entity.add(pathComponent);
// 
//         MinionComponent minionComponent = ENGINE.createComponent(MinionComponent.class);
//         entity.add(minionComponent);
// 
//         ENGINE.addEntity(entity);
//         return entity;
//     }
// 
//     public enum MinionType{
//         LAND,
//         WATER,
//         AIR;
//     }
// }
// 
// Path: core/src/me/minidigger/projecttd/wave/Wave.java
// public class Wave {
// 
//     private List<WaveGroup> groups;
//     private String name;
//     private WaveType type = WaveType.NORMAL;
//     private int points = 100;
//     private float money = 10;
// 
//     public void addGroup(WaveGroup group) {
//         if (groups == null) {
//             groups = new ArrayList<>();
//         }
//         groups.add(group);
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setType(WaveType type) {
//         this.type = type;
//     }
// 
//     public WaveType getType() {
//         return type;
//     }
// 
//     public void setPoints(int points) {
//         this.points = points;
//     }
// 
//     public int getPoints() {
//         return points;
//     }
// 
//     public void setMoney(float money) {
//         this.money = money;
//     }
// 
//     public float getMoney() {
//         return money;
//     }
// 
//     public List<WaveGroup> getGroups() {
//         return groups;
//     }
// 
//     public void setGroups(List<WaveGroup> groups) {
//         this.groups = groups;
//     }
// }
// 
// Path: core/src/me/minidigger/projecttd/wave/WaveBuilder.java
// public class WaveBuilder {
// 
//     private Wave wave = new Wave();
// 
//     public WaveGroupBuilder group() {
//         return new WaveGroupBuilder(this);
//     }
// 
//     public WaveBuilder name(String name) {
//         wave.setName(name);
//         return this;
//     }
// 
//     public WaveBuilder waveType(WaveType type) {
//         wave.setType(type);
//         return this;
//     }
// 
//     public WaveBuilder points(int points) {
//         wave.setPoints(points);
//         return this;
//     }
// 
//     public WaveBuilder money(float amount) {
//         wave.setMoney(amount);
//         return this;
//     }
// 
//     public WaveBuilder group(WaveGroup group) {
//         wave.addGroup(group);
//         return this;
//     }
// 
//     public Wave build() {
//         checkNotNull(wave.getName(), "You need to specify a name for the wave using name()");
//         checkNotNull(wave.getGroups(), "You need to specify at least one group for this wave using group()");
// 
//         return wave;
//     }
// }
// 
// Path: core/src/me/minidigger/projecttd/wave/WaveType.java
// public enum WaveType {
// 
//     NORMAL,
//     BOSS;
//     /* TODO add more special wave types */
// }


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import me.minidigger.projecttd.entities.Minion;
import me.minidigger.projecttd.wave.Wave;
import me.minidigger.projecttd.wave.WaveBuilder;
import me.minidigger.projecttd.wave.WaveType;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.logging.FileHandler;
import java.util.stream.Collectors;
package me.minidigger.projecttd.level;



/**
 * Created by Martin on 29/04/2017.
 */
public class LevelManager {

    private Gson gson = new GsonBuilder().setPrettyPrinting().create();
    private List<Level> levels = new ArrayList<>();

    private LevelManager() {
        load();
    }

    public List<Level> getLevels() {
        if (levels.size() == 0) {
            Vector2 spawn = new Vector2(1.5f, 9.5f);
            Vector2 goal = new Vector2(39.5f, 5.5f);
            Wave wave = new WaveBuilder().waveType(WaveType.NORMAL).name("Wave 1").points(100).money(10)
// Path: core/src/me/minidigger/projecttd/entities/Minion.java
// public class Minion {
// 
//     public static PooledEngine ENGINE;
//     public static Sprite SPRITE;
// 
//     public static Entity newMinion(Vector2 spawn) {
//         Entity entity = ENGINE.createEntity();
// 
//         SpriteComponent spriteComponent = ENGINE.createComponent(SpriteComponent.class);
//         spriteComponent.sprite = SPRITE;
//         entity.add(spriteComponent);
// 
//         VelocityComponent velocityComponent = ENGINE.createComponent(VelocityComponent.class);
//         entity.add(velocityComponent);
// 
//         TransformComponent transformComponent = ENGINE.createComponent(TransformComponent.class);
//         transformComponent.position = spawn;
//         entity.add(transformComponent);
// 
//         HealthComponent healthComponent = ENGINE.createComponent(HealthComponent.class);
//         healthComponent.health = 100;
//         entity.add(healthComponent);
// 
//         PathComponent pathComponent = ENGINE.createComponent(PathComponent.class);
//         entity.add(pathComponent);
// 
//         MinionComponent minionComponent = ENGINE.createComponent(MinionComponent.class);
//         entity.add(minionComponent);
// 
//         ENGINE.addEntity(entity);
//         return entity;
//     }
// 
//     public enum MinionType{
//         LAND,
//         WATER,
//         AIR;
//     }
// }
// 
// Path: core/src/me/minidigger/projecttd/wave/Wave.java
// public class Wave {
// 
//     private List<WaveGroup> groups;
//     private String name;
//     private WaveType type = WaveType.NORMAL;
//     private int points = 100;
//     private float money = 10;
// 
//     public void addGroup(WaveGroup group) {
//         if (groups == null) {
//             groups = new ArrayList<>();
//         }
//         groups.add(group);
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setType(WaveType type) {
//         this.type = type;
//     }
// 
//     public WaveType getType() {
//         return type;
//     }
// 
//     public void setPoints(int points) {
//         this.points = points;
//     }
// 
//     public int getPoints() {
//         return points;
//     }
// 
//     public void setMoney(float money) {
//         this.money = money;
//     }
// 
//     public float getMoney() {
//         return money;
//     }
// 
//     public List<WaveGroup> getGroups() {
//         return groups;
//     }
// 
//     public void setGroups(List<WaveGroup> groups) {
//         this.groups = groups;
//     }
// }
// 
// Path: core/src/me/minidigger/projecttd/wave/WaveBuilder.java
// public class WaveBuilder {
// 
//     private Wave wave = new Wave();
// 
//     public WaveGroupBuilder group() {
//         return new WaveGroupBuilder(this);
//     }
// 
//     public WaveBuilder name(String name) {
//         wave.setName(name);
//         return this;
//     }
// 
//     public WaveBuilder waveType(WaveType type) {
//         wave.setType(type);
//         return this;
//     }
// 
//     public WaveBuilder points(int points) {
//         wave.setPoints(points);
//         return this;
//     }
// 
//     public WaveBuilder money(float amount) {
//         wave.setMoney(amount);
//         return this;
//     }
// 
//     public WaveBuilder group(WaveGroup group) {
//         wave.addGroup(group);
//         return this;
//     }
// 
//     public Wave build() {
//         checkNotNull(wave.getName(), "You need to specify a name for the wave using name()");
//         checkNotNull(wave.getGroups(), "You need to specify at least one group for this wave using group()");
// 
//         return wave;
//     }
// }
// 
// Path: core/src/me/minidigger/projecttd/wave/WaveType.java
// public enum WaveType {
// 
//     NORMAL,
//     BOSS;
//     /* TODO add more special wave types */
// }


// Path: core/src/me/minidigger/projecttd/level/LevelManager.java
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import me.minidigger.projecttd.entities.Minion;
import me.minidigger.projecttd.wave.Wave;
import me.minidigger.projecttd.wave.WaveBuilder;
import me.minidigger.projecttd.wave.WaveType;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.logging.FileHandler;
import java.util.stream.Collectors;

package me.minidigger.projecttd.level;



/**
 * Created by Martin on 29/04/2017.
 */
public class LevelManager {

    private Gson gson = new GsonBuilder().setPrettyPrinting().create();
    private List<Level> levels = new ArrayList<>();

    private LevelManager() {
        load();
    }

    public List<Level> getLevels() {
        if (levels.size() == 0) {
            Vector2 spawn = new Vector2(1.5f, 9.5f);
            Vector2 goal = new Vector2(39.5f, 5.5f);
            Wave wave = new WaveBuilder().waveType(WaveType.NORMAL).name("Wave 1").points(100).money(10)
                    .group().delay(5).interval(1).health(100).speed(6).type(Minion.MinionType.LAND).count(10).sprite(Minion.SPRITE).spawn(spawn).goal(goal).finish()