001    package org.dllearner.examples;
002    
003    /**
004     * A poker hand consists of 5 cards.
005     * 
006     * @author Jens Lehmann
007     *
008     */
009    public class PokerHand {
010    
011            private PokerCard[] cards;
012            int handType;
013            
014            /**
015             * 
016             * @param cards
017             * @param hand
018             *            Ordinal (0-9)
019             * 
020             * 0: Nothing in hand; not a recognized poker hand 
021             * 1: One pair; one pair of equal ranks within five cards 
022             * 2: Two pairs; two pairs of equal ranks within five cards 
023             * 3: Three of a kind; three equal ranks within five cards
024             * 4: Straight; five cards, sequentially ranked with no gaps 
025             * 5: Flush; five cards with the same suit 
026             * 6: Full house; pair + different rank three of a kind 
027             * 7: Four of a kind; four equal ranks within five cards 
028             * 8: Straight flush; straight + flush 
029             * 9: Royal flush; {Ace, King, Queen, Jack, Ten} + flush
030             */
031            public PokerHand(PokerCard[] cards, int hand) {
032                    this.cards = cards;
033                    this.handType = hand;
034            }
035    
036            public PokerCard[] getCards() {
037                    return cards;
038            }
039    
040            public int getHandType() {
041                    return handType;
042            }
043    
044    }