package pp.monopoly.model.card;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Queue;

import pp.monopoly.model.CardVisitor;

public class DeckHelper implements CardVisitor<Void>{

    private static Queue<Card> cards;

    private DeckHelper() {
        
    }

    @Override
    public Void visit(Card c) {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'visit'");
    }

    private void shuffle() {
        List<Card> cardList = new ArrayList<>(cards);
        Collections.shuffle(cardList);
        cards.clear();
        cards.addAll(cardList);
    }

    public static Card drawCard() {
        return cards != null ? cards.poll() : null;
    }
}
