package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters;

import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
import it.polimi.ingsw.gc14.Model.Player;

public class Gatherer extends Character {

    /**
     * Creates a Gatherer character card with the specified era.
     *
     * @param Era Gatherers era.
     */
    public Gatherer(int Era) {
        super(Era, CharacterType.GATHERER);
    }

    /**
     * Creates a Gatherer character card with the specified era and minimum number of players.
     *
     * @param Era the era of the Gatherer card.
     * @param nMin the minimum number of players required for the card.
     */
    public Gatherer(int Era, int nMin) {
        super(Era, CharacterType.GATHERER,nMin);
    }

    /**
     * Returns the string representation of this Gatherer card.
     *
     * @return the string representation of this Gatherer card.
     */
    @Override
    public String toString() {
        return super.toString();
    }

    /**
     * Creates and returns a copy of this Gatherer card.
     *
     * @return a clone of this Gatherer card.
     */
    @Override
    public Character clone() {
        return new Gatherer(getEra(), getNMin());
    }

    /**
     * Inserts this Gatherer card into the specified player's Gatherer collection.
     *
     * @param player the player who receives the card.
     */
    public void insert(Player player) {
        player.gatherers.add(this);
    }
}
