Skip to content
Snippets Groups Projects
Commit dfbcac32 authored by Carine Margrethe Rondeel's avatar Carine Margrethe Rondeel
Browse files

Implement final fixes

parent bb0f12e5
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ public class DeckOfCards {
HandOfCards hand = new HandOfCards();
while (hand.getHandAmount() < n) {
int randomCard = random.nextInt(deck.size() - 1);
int randomCard = random.nextInt(deck.size() );
hand.addCardToHand(deck.get(randomCard));
}
......
......@@ -49,6 +49,6 @@ public class HandOfCards {
long diamonds = hand.stream().filter(card -> card.getSuit() == 'D').count();
long clubs = hand.stream().filter(card -> card.getSuit() == 'C').count();
return spades == 5 || hearts == 5 || diamonds == 5 || clubs == 5;
return spades >= 5 || hearts >= 5 || diamonds >= 5 || clubs >= 5;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment