diff --git a/bin/cards/maumau/MauMauDeck.class b/bin/cards/maumau/MauMauDeck.class index aef60b8..95dbfa5 100644 Binary files a/bin/cards/maumau/MauMauDeck.class and b/bin/cards/maumau/MauMauDeck.class differ diff --git a/src/cards/maumau/MauMauDeck.java b/src/cards/maumau/MauMauDeck.java index 9595b17..bbe293c 100644 --- a/src/cards/maumau/MauMauDeck.java +++ b/src/cards/maumau/MauMauDeck.java @@ -1,7 +1,11 @@ package cards.maumau; import cards.Card; +import cards.Rank; +import cards.Suit; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** @@ -20,7 +24,20 @@ public class MauMauDeck { * @return A list containing the generated deck of cards. */ public static List makeDeck(int numDecks) { - //TODO implement - return null; + List deck = new ArrayList<>(); + + for(int i = 0; i < numDecks; i++){ + for(Rank rank : Rank.values()) { + for(Suit suit : Suit.values()) { + if(rank != Rank.TWO && rank != Rank.THREE && rank != Rank.FOUR && rank != Rank.FIVE && rank != Rank.SIX) { + deck.add(new Card(rank,suit)); + } + } + } + } + + Collections.shuffle(deck); + + return deck; } }