package com.bernard.greposimu.model.game;

import java.util.Collections;
import java.util.Set;

import com.bernard.greposimu.Utils;
import com.bernard.greposimu.model.game.powers.Power;
import com.bernard.greposimu.model.game.researches.Research;
import com.bernard.greposimu.model.game.units.Hero;
import com.bernard.greposimu.model.game.units.Unit;

public class GameConfig {
	
	Set<God> gods;
	
	// Non-hero units
	Set<Unit> units;
	
	Set<Hero> heroes;
	
	Set<Research> researches;
	
	Set<Power> powers;
	
	
	
	public GameConfig(Set<God> gods, Set<Unit> units, Set<Hero> heroes, Set<Research> researches, Set<Power> powers) {
		this.gods = gods;
		this.units = units;
		this.heroes = heroes;
		this.researches = researches;
		this.powers = powers;
	}
	
	public Set<God> getGods() {
		return gods;
	}

	public Set<Unit> getUnits() {
		return Collections.unmodifiableSet(this.units);
	}
	
	public Unit getUnit(String id) {
		return Utils.getIdentified(this.units, id);
	}
	
	public Set<Hero> getHeroes() {
		return Collections.unmodifiableSet(this.heroes);
	}
	public Hero getHero(String id) {
		return Utils.getIdentified(this.heroes, id);
	}
	
	public Set<Research> getResearches() {
		return Collections.unmodifiableSet(this.researches);
	}
	public Research getResearch(String id) {
		return Utils.getIdentified(this.researches, id);
	}
	
}
