package eu.jonahbauer.wizard.core.model.card;

import eu.jonahbauer.wizard.common.model.Card;
import eu.jonahbauer.wizard.common.util.Pair;

import java.util.List;
import java.util.UUID;

public class ChangelingWizardCard extends WizardCard implements Subcard {
    public ChangelingWizardCard(Card card) {
        super(card);
    }

    @Override
    public void play(UUID player, List<Card> hand, List<Pair<UUID, Card>> stack) {
        GameCards.CHANGELING.checkHand(hand);
        hand.remove(Card.CHANGELING);
        stack.add(Pair.of(player, getCard()));
    }

    @Override
    public boolean isPlayable(List<Card> hand, List<Pair<UUID, Card>> stack) {
        return hand.contains(Card.CHANGELING);
    }
}
