package org.studiorailgun.sim.org;

import java.util.LinkedList;
import java.util.List;

import org.studiorailgun.sim.space.Region;

/**
 * A government
 */
public class Government {
    
    /**
     * The list of territories under the leadership of this unit of government
     */
    List<Region> territories = new LinkedList<Region>();

    /**
     * Subdivisions of this government
     */
    List<Government> subdivision = new LinkedList<Government>();

    /**
     * The type of government
     */
    String type;

    /**
     * The name of the government
     */
    String name;

    /**
     * Constructor
     * @param type The type of government
     * @param name The name of the government
     */
    public Government(String type, String name){
        this.type = type;
        this.name = name;
    }

    public List<Region> getTerritories() {
        return territories;
    }

    public void setTerritories(List<Region> territories) {
        this.territories = territories;
    }

    /**
     * Adds a region to the territories controlled by this government
     * @param region The region
     */
    public void addTerritory(Region region){
        this.territories.add(region);
    }

    /**
     * Removes a region from the territories controlled by this government
     * @param region The region
     */
    public void removeTerritory(Region region){
        this.territories.remove(region);
    }

    public List<Government> getSubdivision() {
        return subdivision;
    }

    public void setSubdivision(List<Government> subdivision) {
        this.subdivision = subdivision;
    }

    /**
     * Adds a subdivision to this government
     * @param subdivision The subdivision
     */
    public void addSubdivision(Government subdivision){
        this.subdivision.add(subdivision);
    }

    /**
     * Removes a subdivision from this government
     * @param subdivision The subdivision
     */
    public void removeSubdivision(Government subdivision){
        this.subdivision.remove(subdivision);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    

}
