Permalink
Browse files

Modified app to support checking for all of the different poker hands…

…. Test cases are currently broken.
  • Loading branch information...
1 parent 6b71b2a commit 340be74deca22f53d1da0ca8d7f9cbc45848caea @MusikPolice committed Oct 4, 2012
Showing with 434 additions and 22 deletions.
  1. +2 −5 src/pokerhands/Card.java
  2. +4 −0 src/pokerhands/Deck.java
  3. +424 −15 src/pokerhands/Hand.java
  4. +4 −2 src/pokerhands/Pokerhands.java
@@ -16,15 +16,15 @@
/**
* 1 is an ace
- * 14 is an ace
+ * 13 is a king
*/
private int rank;
private SUIT suit;
public Card(int rank, SUIT suit)
{
- if (rank > 0 && rank < 15)
+ if (rank > 0 && rank < 14)
{
this.rank = rank;
}
@@ -77,9 +77,6 @@ public String toString()
case 13:
sb.append("KING");
break;
- case 14:
- sb.append("ACE");
- break;
default:
sb.append(rank);
break;
@@ -15,6 +15,10 @@
private int index = 0;
+ /**
+ * Creates a new Deck of cards.
+ * A deck contains 52 total cards; 13 of each of the four suits.
+ */
public Deck()
{
for (SUIT s : Card.SUIT.values())
Oops, something went wrong.

0 comments on commit 340be74

Please sign in to comment.