Deck.java - package game import java.util.ArrayList import java.util.Collections public class Deck private ArrayList<Card> deck = new ArrayList<Card>

Deck.java - package game import java.util.ArrayList import...

This preview shows page 1 - 2 out of 4 pages.

package game; import java.util.ArrayList; import java.util.Collections; public class Deck { private ArrayList<Card> deck = new ArrayList<Card>(); private ArrayList<Card> cards = new ArrayList<Card>(); private ArrayList<Card> playedCards = new ArrayList<Card>(); // public Deck() { // deck = new ArrayList<Card>(); // } // deck = new ArrayList<Card>(); public void makeDeck() { // ZERO deck.add(new Card(CardColor.RED, CardValue.ZERO)); deck.add(new Card(CardColor.BLUE, CardValue.ZERO)); deck.add(new Card(CardColor.YELLOW, CardValue.ZERO)); deck.add(new Card(CardColor.GREEN, CardValue.ZERO)); // Value Cards deck.add(new Card(CardColor.RED, CardValue.ONE)); deck.add(new Card(CardColor.BLUE, CardValue.ONE)); deck.add(new Card(CardColor.YELLOW, CardValue.ONE)); deck.add(new Card(CardColor.GREEN, CardValue.ONE)); deck.add(new Card(CardColor.RED, CardValue.ONE)); deck.add(new Card(CardColor.BLUE, CardValue.ONE)); deck.add(new Card(CardColor.YELLOW, CardValue.ONE)); deck.add(new Card(CardColor.GREEN, CardValue.ONE)); deck.add(new Card(CardColor.RED, CardValue.TWO)); deck.add(new Card(CardColor.BLUE, CardValue.TWO)); deck.add(new Card(CardColor.YELLOW, CardValue.TWO)); deck.add(new Card(CardColor.GREEN, CardValue.TWO)); deck.add(new Card(CardColor.RED, CardValue.TWO)); deck.add(new Card(CardColor.BLUE, CardValue.TWO)); deck.add(new Card(CardColor.YELLOW, CardValue.TWO)); deck.add(new Card(CardColor.GREEN, CardValue.TWO)); deck.add(new Card(CardColor.RED, CardValue.THREE)); deck.add(new Card(CardColor.BLUE, CardValue.THREE)); deck.add(new Card(CardColor.YELLOW, CardValue.THREE)); deck.add(new Card(CardColor.GREEN, CardValue.THREE)); deck.add(new Card(CardColor.RED, CardValue.THREE)); deck.add(new Card(CardColor.BLUE, CardValue.THREE)); deck.add(new Card(CardColor.YELLOW, CardValue.THREE));
Image of page 1
Image of page 2

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture