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

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

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

public class ChangelingJesterCard extends JesterCard implements Subcard {
    public ChangelingJesterCard(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()));
    }

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