app/src/main/java/com/zenappse/memorymatcher/GameController.java
public GameGridCardDeck shuffleDeck() {
        ArrayList<Card> joinedDeck = new ArrayList<>(gameGridCardDeck.getDeckOfCards(0));
        joinedDeck.addAll(gameGridCardDeck.getDeckOfCards(1));

        Collections.shuffle(joinedDeck);

        ArrayList<Card> deckOne = new ArrayList<>();
        ArrayList<Card> deckTwo = new ArrayList<>();

        int countOfCards = 0;
        int position = 0;

        // Separate deck of cards into respective game board array lists
        for (Card card : joinedDeck) {
            if (countOfCards < 12) {
                card.setGameBoard(0);
                deckOne.add(card);
            } else {
                card.setGameBoard(1);
                deckTwo.add(card);
            }

            if (position >= 12) {
                position = 0;
            }
            card.setPosition(position);

            countOfCards++;
            position++;
        }

        gameGridCardDeck.setDeckOfCards(0, deckOne);
        gameGridCardDeck.setDeckOfCards(1, deckTwo);

        return gameGridCardDeck;
    }
/**
     * Shuffles the cards based on the Collections.shuffle() method
     *
     * @return GameGridCardDeck
     */
Shuffles the cards based on the Collections.shuffle() method
@return GameGridCardDeck
Shuffles the cards based on the Collections . shuffle () method @return GameGridCardDeck
public GameGridCardDeck shuffleDeck() {
        ArrayList<Card> joinedDeck = new ArrayList<>(gameGridCardDeck.getDeckOfCards(0));
        joinedDeck.addAll(gameGridCardDeck.getDeckOfCards(1));
        Collections.shuffle(joinedDeck);
        ArrayList<Card> deckOne = new ArrayList<>();
        ArrayList<Card> deckTwo = new ArrayList<>();
        int countOfCards = 0;
        int position = 0;
        for (Card card : joinedDeck) {
            if (countOfCards < 12) {
                card.setGameBoard(0);
                deckOne.add(card);
            } else {
                card.setGameBoard(1);
                deckTwo.add(card);
            }
            if (position >= 12) {
                position = 0;
            }
            card.setPosition(position);
            countOfCards++;
            position++;
        }
        gameGridCardDeck.setDeckOfCards(0, deckOne);
        gameGridCardDeck.setDeckOfCards(1, deckTwo);
        return gameGridCardDeck;
    }
public GameGridCardDeck shuffleDeck ( ) { ArrayList < Card > joinedDeck = new ArrayList < > ( gameGridCardDeck . getDeckOfCards ( 0 ) ) ; joinedDeck . addAll ( gameGridCardDeck . getDeckOfCards ( 1 ) ) ; Collections . shuffle ( joinedDeck ) ; ArrayList < Card > deckOne = new ArrayList < > ( ) ; ArrayList < Card > deckTwo = new ArrayList < > ( ) ; int countOfCards = 0 ; int position = 0 ; for ( Card card : joinedDeck ) { if ( countOfCards < 12 ) { card . setGameBoard ( 0 ) ; deckOne . add ( card ) ; } else { card . setGameBoard ( 1 ) ; deckTwo . add ( card ) ; } if ( position >= 12 ) { position = 0 ; } card . setPosition ( position ) ; countOfCards ++ ; position ++ ; } gameGridCardDeck . setDeckOfCards ( 0 , deckOne ) ; gameGridCardDeck . setDeckOfCards ( 1 , deckTwo ) ; return gameGridCardDeck ; }
Shuffles the cards based on the Collections.shuffle() method
 @return GameGridCardDeck
Shuffles the cards based on the Collections . shuffle () method @return GameGridCardDeck
// Separate deck of cards into respective game board array lists