using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class Player : MonoBehaviour {

    private string name;
    private List<Monster> monsters;
    private int activeMonster;
    private int deadMonsters;

    public Player(string name) {
        this.name = name;
        monsters = new List<Monster>(3);
        deadMonsters = 0;
    }

	void SetName(string name){
        this.name = name;
    }
	
	public string GetName(){
		return name;
	}
	
    public void SetActiveMonster(int index){
        activeMonster = index;
    }

    public int GetActiveMonster() {
        return activeMonster;
    }

    public void AddMonster(Monster monster){
        monsters.Add(monster);
    }

    public List<Monster> GetMonsters() {
        return monsters;
    }

    public int GetDeadMonsters() {

        deadMonsters = 0;
        foreach (Monster monster in monsters) {
            if (monster.GetIsDead()) {
                deadMonsters++;
            }
        }
        return deadMonsters;
    }
}
