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

public class HumanPlayer : BasePlayer {

    private HumanPly humanPly;

    public void PassObject(HumanPly hp) {
        this.humanPly = hp;
    }

    public HumanPlayer PassSelf() {
        return this;
    }

    private bool finishedMove;

    public override void Initialize() {
        this.hero = new Hero();
        this.hand = new Hand();
        this.deck = new Deck();
        this.units = new List<Unit>();

        this.finishedMove = false;

        this.isFirst = false;
        this.isMyTurn = false;
        this.isFinishedWithCurrentTurn = true;
    }

    protected override void NameHero() {
        this.hero.SetName("Human Hero");
    }

    public void EndTurn() {
        this.finishedMove = true;
    }

    protected override void MakeMove() {
        if (this.finishedMove) {
            this.hero.MoveUp();
            this.isMyTurn = false;
            this.isFinishedWithCurrentTurn = true;
            this.finishedMove = false;
        }
    }
}
