package ei.game.player;

import ei.engine.state.GameStateManager;
import ei.game.gamestate.EndGameState;
import ei.game.network.entities.NetworkPlayer;
import ei.game.scene.buildings.Building;
import ei.game.scene.buildings.CommandCenter;

public class HumanPlayer extends NetworkPlayer{
	private CommandCenter cc;
	
	public HumanPlayer(){
		super();
		cc = new CommandCenter(10,5,this);
		addUnit(cc);
	}
	
	public Building getCC() {
		return cc;
	}

	@Override
	public boolean defeated() {
		if(cc.getLife() <= 0){
			return true;
		}
		return false;
	}

	@Override
	public void endGame(int s) {
		GameStateManager.getInstance().addState(new EndGameState("EndGameState",s));
		GameStateManager.getInstance().setActive("EndGameState");
	}

}
