/** Clear and shuffle the when beginning a new round. */ public void newRound() { deck.clear(); for (CardValue card : CardValue.values()) { for (Suit suit : Suit.values()) { deck.add(new Card(card, suit)); } } shuffleDeck(); }
/** @return the image associated with the card */ public ImageIcon getImage() { String cardName = "/edu/psu/ist412/view/graphics/" + value.toString() + suit.toString() + ".png"; return new ImageIcon(getClass().getResource(cardName)); }