package com.bernard.greposimu.model.game.units;

import java.util.Map;
import java.util.Set;

import com.bernard.greposimu.model.game.God;
import com.bernard.greposimu.model.game.Identified;
import com.bernard.greposimu.model.game.Resources;
import com.bernard.greposimu.model.game.researches.Research;

public abstract class Unit implements Identified{
	
	String id;

	String name;
	String description;
	int population;
	int speed;
	
	boolean mythological;
	
	God god;
	Resources buildCost;
	int favorCost;
	int buildTime;
	
	Set<Research> research_dependencies;
	Map<String, Integer> building_dependencies;
	
	@Override
	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}


	public String getDescription() {
		return description;
	}


	public int getPopulation() {
		return population;
	}


	public int getSpeed() {
		return speed;
	}


	public boolean isMythological() {
		return mythological;
	}


	public God getGod() {
		return god;
	}


	public Resources getBuildCost() {
		return buildCost;
	}


	public int getFavorCost() {
		return favorCost;
	}


	public int getBuildTime() {
		return buildTime;
	}


	public Set<Research> getResearch_dependencies() {
		return research_dependencies;
	}


	public Map<String, Integer> getBuilding_dependencies() {
		return building_dependencies;
	}

	public abstract boolean isGround();
	
	public boolean isNaval() {
		return !this.isGround();
	}
	
	@Override
	public String toString() {
		return name;
	}
	
}
