package model.state;

import java.util.ArrayList;
import java.util.List;
import model.state.gameelement.AttributeContainer;
import model.state.gameelement.DrawableGameElementState;
import model.state.gameelement.GameElementState;
import model.state.gameelement.SelectableGameElementState;


/**
 * The Level class is the direct point of interaction for most gameplay and editing - this class
 * holds all of the GameElements being used for the current editing and/or game running session.
 * Essentially a data wrapper class for all objects and states contained in a level.
 *
 * @author Steve, Jonathan, Nishad, Rahul
 *
 */
public class LevelState extends DescribableState {

    public AttributeContainer attributes;
    private List<DrawableGameElementState> myTerrains;
    private List<SelectableGameElementState> myUnits;
    private List<GameElementState> myGoals;

    public LevelState (String name) {
        super(name);
        attributes = new AttributeContainer();
        myTerrains = new ArrayList<>();
        myUnits = new ArrayList<>();
        myGoals = new ArrayList<>();
    }

    public List<DrawableGameElementState> getTerrain () {
        return myTerrains;
    }

    public void addTerrain (DrawableGameElementState terrain) {
        myTerrains.add(terrain);
    }

    public List<SelectableGameElementState> getUnits () {
        return myUnits;
    }

    public void addUnit (SelectableGameElementState unit) {
        myUnits.add(unit);
    }

    public List<GameElementState> getGoals () {
        return myGoals;
    }

    public void addGoal (GameElementState goal) {
        myGoals.add(goal);
    }

}

@@ -1102,461 +1102,1104 @@
     
-public List%3CDrawableGameElementState%3E getTerrain () %7B%0A        return myTerrains;%0A    %7D%0A%0A    public void addTerrain (DrawableGameElementState terrain) %7B%0A        myTerrains.add(terrain);%0A    %7D%0A%0A    public List%3CSelectableGameElementState%3E getUnits () %7B%0A        return myUnits;%0A    %7D%0A%0A    public void addUnit (SelectableGameElementState unit) %7B%0A        myUnits.add(unit);%0A    %7D%0A%0A    public List%3CGameElementState%3E getGoals () %7B%0A        return myGoals;%0A    %7D%0A
+/**%0A     * %0A     * @return List%3CDrawableGameElementState%3E%0A     *         the list of the level's terrains%0A     */%0A    public List%3CDrawableGameElementState%3E getTerrain () %7B%0A        return myTerrains;%0A    %7D%0A%0A    /**%0A     * %0A     * @param terrain%0A     *        the terrain to be added to the level's terrains%0A     */%0A    public void addTerrain (DrawableGameElementState terrain) %7B%0A        myTerrains.add(terrain);%0A    %7D%0A    %0A    /**%0A     * %0A     * @return myUnits%0A     *         the list of the level's units%0A     */%0A    public List%3CSelectableGameElementState%3E getUnits () %7B%0A        return myUnits;%0A    %7D%0A%0A    /**%0A     * %0A     * @param unit%0A     *        the unit to be added to the level's list of units%0A     */%0A    public void addUnit (SelectableGameElementState unit) %7B%0A        myUnits.add(unit);%0A    %7D%0A%0A    /**%0A     * %0A     * @return List%3CGameElementState%3E%0A     *         the list of the level's goals%0A     */%0A    public List%3CGameElementState%3E getGoals () %7B%0A        return myGoals;%0A    %7D%0A%0A    /**%0A     * %0A     * @param goal%0A     *        the goal to be added to the level's list of goals%0A     */
 %0A   

improve comments in levelstate.java