Skip to content
Snippets Groups Projects
Commit bec867a7 authored by iliya's avatar iliya
Browse files

added useless constructor

parent 738f6482
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,13 @@ public class Hand implements Comparable<Hand>, Iterable<Card> { ...@@ -27,6 +27,13 @@ public class Hand implements Comparable<Hand>, Iterable<Card> {
this.hand.add(card); this.hand.add(card);
} }
public Hand(Card... cards) {
this.hand = new ArrayList<>();
for (Card card : cards) {
this.hand.add(card);
}
}
public Card getCardFromHand(int idx) { public Card getCardFromHand(int idx) {
return this.hand.get(idx); return this.hand.get(idx);
} }
...@@ -60,4 +67,8 @@ public class Hand implements Comparable<Hand>, Iterable<Card> { ...@@ -60,4 +67,8 @@ public class Hand implements Comparable<Hand>, Iterable<Card> {
public String toString() { public String toString() {
return this.hand.toString(); return this.hand.toString();
} }
// public contains(String rankName) {
// if this.hand.contains()
// }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment