PokerRules
Date: 2017-05-13

game_backend

## Class PokerRules

- java.lang.Object
- - game_backend.PokerRules

- Direct Known Subclasses:
    DoubleBonus

      public abstract class PokerRules
      extends java.lang.Object

  Abstract class that contains generic Poker rules. Notwithstanding it must be latter specified how the hand is evaluated and the values of the possible combinations for a given variant
  Author:
    João Vieira, Guilherme Reis, Catarina Santos

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PokerRules()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int[]` | `advice(Card[] cards)` Abstract method.
    `protected java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>>` | `computeCandidateStraights(Card[] cards)` Computes all possible sequences that could end being a straight.
    `protected java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>>` | `computeSameRank(Card[] cards)` Groups all cards with the same rank in a list that is addressed with the respective rank in a map
    `protected java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>>` | `computeSameSuit(Card[] cards)` Groups all cards with the same suit in a list that is addressed with the respective suit in a map
    `abstract java.lang.String` | `evaluateHand(Card[] cards)` Abstract method.
    `protected int[]` | `getHighCards(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Returns the positions of the vector of cards passed as argument that are high cards
    `protected int[]` | `getIntFromList(java.util.ArrayList<java.lang.Integer> list)` Converts a list of Integer in an array of primitive type int
    `protected int[]` | `intersect(int[] array1, int[] array2)` Performs the intersection between to arrays in terms of their content
    `protected int[]` | `isAce(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Ace"
    `protected int[]` | `isAKQJUnsuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "AKQJ unsuited"
    `protected int[]` | `isFlush(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Flush"
    `protected int[]` | `isFourOfAKind(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Four of a kind"
    `protected int[]` | `isFourToAFlush(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Four to a flush"
    `protected int[]` | `isFourToAnInsideStraightWithNHighCards(Card[] cards, int n, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to an inside straight with N high cards"
    `protected int[]` | `isFourToAnInsideStraightWithNoHighCards(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to an inside straight with no high cards"
    `protected int[]` | `isFourToAnInsideStraightWithOneHighCard(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to an inside straight with one high card"
    `protected int[]` | `isFourToAnInsideStraightWithThreeHighCards(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to an inside straight with three high cards"
    `protected int[]` | `isFourToAnInsideStraightWithTwoHighCards(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to an inside straight with two high cards"
    `protected int[]` | `isFourToAnOutsideStraight(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to an outside straight"
    `protected int[]` | `isFourToAStraightFlush(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to a straight flush"
    `protected int[]` | `isFourToRoyalFlush(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Four to a royal flush"
    `protected int[]` | `isFullHouse(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Full House"
    `protected int[]` | `isHighPair(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "High pair"
    `protected int[]` | `isJackOrQueenOrKing(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Jack, Queen or King"
    `protected int[]` | `isJTSuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "JT suited"
    `protected int[]` | `isKJUnsuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "KJ unsuited"
    `protected int[]` | `isKQJUnsuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "KQJ unsuited"
    `protected int[]` | `isKQUnsuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "KQ unsuited"
    `protected int[]` | `isKTSuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "KT suited"
    `protected int[]` | `isLowPair(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Low pair"
    `protected int[]` | `isNOfAKind(Card[] cards, int n, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "N of a kind"
    `protected int[]` | `isNToARoyalFlush(Card[] cards, int n, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Three to a royal flush"
    `protected int[]` | `isQJSuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "QJ suited"
    `protected int[]` | `isQJUnsuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "QJ unsuited"
    `protected int[]` | `isQTSuited(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "QT suited"
    `protected int[]` | `isRoyalFlush(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Royal flush"
    `protected int[]` | `isStraight(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Straight"
    `protected int[]` | `isStraightFlush(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Straight flush"
    `protected int[]` | `isThreeAces(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Three aces"
    `protected int[]` | `isThreeOfAKind(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Three of a kind"
    `protected int[]` | `isThreeToAFlushWithNHighCards(Card[] cards, int n, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Three to a flush with N high cards"
    `protected int[]` | `isThreeToAFlushWithNoHighCards(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Three to a flush with no high cards"
    `protected int[]` | `isThreeToAFlushWithOneHighCard(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Three to a flush with one high card"
    `protected int[]` | `isThreeToAFlushWithTwoHighCards(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Three to a flush with two high cards"
    `protected int[]` | `isThreeToARoyalFlush(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Three to a royal flush"
    `protected int[]` | `isThreeToAStraightFlushTypeOne(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Three to a straight flush (type 1)"
    `protected int[]` | `isThreeToAStraightFlushTypeThree(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Three to a straight flush (type 3)"
    `protected int[]` | `isThreeToAStraightFlushTypeTwo(Card[] cards, java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)` Indicates if the hand is a "Three to a straight flush (type 2)"
    `protected int[]` | `isTwoPair(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Two pair"
    `protected int[]` | `isTwoSuitedHighCards(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Two suited high cards"
    `protected java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>>` | `populateWithComutations(int[] rt)` Computes all combinations that can end being a candidate straight.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PokerRules

          public PokerRules()

  - ### Method Detail

    - #### advice

          public abstract int[] advice(Card[] cards)

      Abstract method. Indicates that a subclass has to define how the player should be advised regarding the variant that he's playing
      Parameters:
        `cards` - Cards to be evaluated
      Returns:
        int[] Cards that, according to the variant's strategy, player should hold

    - #### evaluateHand

          public abstract java.lang.String evaluateHand(Card[] cards)

      Abstract method. Indicates that a subclass has to define which hands are awarded
      Parameters:
        `cards` - Cards to be evaluated
      Returns:
        String Name of the awarded hand if it is; null otherwise

    - #### isThreeToAStraightFlushTypeThree

          protected int[] isThreeToAStraightFlushTypeThree(Card[] cards,
                                                           java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Three to a straight flush (type 3)"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAnInsideStraightWithNoHighCards

          protected int[] isFourToAnInsideStraightWithNoHighCards(Card[] cards,
                                                                  java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to an inside straight with no high cards"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAnInsideStraightWithOneHighCard

          protected int[] isFourToAnInsideStraightWithOneHighCard(Card[] cards,
                                                                  java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to an inside straight with one high card"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isThreeToAStraightFlushTypeTwo

          protected int[] isThreeToAStraightFlushTypeTwo(Card[] cards,
                                                         java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Three to a straight flush (type 2)"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAnInsideStraightWithTwoHighCards

          protected int[] isFourToAnInsideStraightWithTwoHighCards(Card[] cards,
                                                                   java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to an inside straight with two high cards"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAnInsideStraightWithThreeHighCards

          protected int[] isFourToAnInsideStraightWithThreeHighCards(Card[] cards,
                                                                     java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to an inside straight with three high cards"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAnInsideStraightWithNHighCards

          protected int[] isFourToAnInsideStraightWithNHighCards(Card[] cards,
                                                                 int n,
                                                                 java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to an inside straight with N high cards"
      Parameters:
        `cards` - Cards to be considered
        `n` - Number of high cards
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isThreeToAStraightFlushTypeOne

          protected int[] isThreeToAStraightFlushTypeOne(Card[] cards,
                                                         java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Three to a straight flush (type 1)"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isThreeToAFlushWithOneHighCard

          protected int[] isThreeToAFlushWithOneHighCard(Card[] cards,
                                                         java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Three to a flush with one high card"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isTwoSuitedHighCards

          protected int[] isTwoSuitedHighCards(Card[] cards,
                                               java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit,
                                               java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Two suited high cards"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### getHighCards

          protected int[] getHighCards(Card[] cards,
                                       java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Returns the positions of the vector of cards passed as argument that are high cards
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of the vector of cards passed as argument that are high cards

    - #### intersect

          protected int[] intersect(int[] array1,
                                    int[] array2)

      Performs the intersection between to arrays in terms of their content
      Parameters:
        `array1` - First array of values to consider
        `array2` - Second array of values to consider
      Returns:
        int[] Vector containing all the elements present in both arrays

    - #### isThreeToAFlushWithNoHighCards

          protected int[] isThreeToAFlushWithNoHighCards(Card[] cards,
                                                         java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Three to a flush with no high cards"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isThreeToAFlushWithTwoHighCards

          protected int[] isThreeToAFlushWithTwoHighCards(Card[] cards,
                                                          java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Three to a flush with two high cards"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isThreeToAFlushWithNHighCards

          protected int[] isThreeToAFlushWithNHighCards(Card[] cards,
                                                        int n,
                                                        java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Three to a flush with N high cards"
      Parameters:
        `cards` - Cards to be considered
        `n` - Number of high cards
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAnOutsideStraight

          protected int[] isFourToAnOutsideStraight(Card[] cards,
                                                    java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to an outside straight"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isThreeToARoyalFlush

          protected int[] isThreeToARoyalFlush(Card[] cards,
                                               java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit,
                                               java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Three to a royal flush"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isNToARoyalFlush

          protected int[] isNToARoyalFlush(Card[] cards,
                                           int n,
                                           java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit,
                                           java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Three to a royal flush"
      Parameters:
        `cards` - Cards to be considered
        `n` - Number of gaps existing in the straight candidate
        `cardsSameSuit` - List of all cards of the same suit
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### getIntFromList

          protected int[] getIntFromList(java.util.ArrayList<java.lang.Integer> list)

      Converts a list of Integer in an array of primitive type int
      Parameters:
        `list` - List of Integer to convert
      Returns:
        int[] Array of int corresponding to the values in list

    - #### isFourToAFlush

          protected int[] isFourToAFlush(Card[] cards,
                                         java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Four to a flush"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isFourToAStraightFlush

          protected int[] isFourToAStraightFlush(Card[] cards,
                                                 java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit,
                                                 java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to a straight flush"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFourToRoyalFlush

          protected int[] isFourToRoyalFlush(Card[] cards,
                                             java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit,
                                             java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Four to a royal flush"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isStraight

          protected int[] isStraight(Card[] cards,
                                     java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights)

      Indicates if the hand is a "Straight"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
      Returns:
        int[] positions of cards that should be held

    - #### isFlush

          protected int[] isFlush(Card[] cards,
                                  java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Flush"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isStraightFlush

          protected int[] isStraightFlush(Card[] cards,
                                          java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights,
                                          java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Straight flush"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isRoyalFlush

          protected int[] isRoyalFlush(Card[] cards,
                                       java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> candidateStraights,
                                       java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)

      Indicates if the hand is a "Royal flush"
      Parameters:
        `cards` - Cards to be considered
        `candidateStraights` - List of all combinations that could end being a straight
        `cardsSameSuit` - List of all cards of the same suit
      Returns:
        int[] positions of cards that should be held

    - #### isLowPair

          protected int[] isLowPair(Card[] cards,
                                    java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Low pair"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isHighPair

          protected int[] isHighPair(Card[] cards,
                                     java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "High pair"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isThreeOfAKind

          protected int[] isThreeOfAKind(Card[] cards,
                                         java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Three of a kind"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isFullHouse

          protected int[] isFullHouse(Card[] cards,
                                      java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Full House"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isThreeAces

          protected int[] isThreeAces(Card[] cards,
                                      java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Three aces"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isNOfAKind

          protected int[] isNOfAKind(Card[] cards,
                                     int n,
                                     java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "N of a kind"
      Parameters:
        `cards` - Cards to be considered
        `n` - Number of cards with the same rank
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isFourOfAKind

          protected int[] isFourOfAKind(Card[] cards,
                                        java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Four of a kind"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isTwoPair

          protected int[] isTwoPair(Card[] cards,
                                    java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Two pair"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isAKQJUnsuited

          protected int[] isAKQJUnsuited(Card[] cards,
                                         java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "AKQJ unsuited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isQJSuited

          protected int[] isQJSuited(Card[] cards,
                                     java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "QJ suited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isKQJUnsuited

          protected int[] isKQJUnsuited(Card[] cards,
                                        java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "KQJ unsuited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isJTSuited

          protected int[] isJTSuited(Card[] cards,
                                     java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "JT suited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isQJUnsuited

          protected int[] isQJUnsuited(Card[] cards,
                                       java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "QJ unsuited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isQTSuited

          protected int[] isQTSuited(Card[] cards,
                                     java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "QT suited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isKQUnsuited

          protected int[] isKQUnsuited(Card[] cards,
                                       java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "KQ unsuited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isKJUnsuited

          protected int[] isKJUnsuited(Card[] cards,
                                       java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "KJ unsuited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isKTSuited

          protected int[] isKTSuited(Card[] cards,
                                     java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "KT suited"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isJackOrQueenOrKing

          protected int[] isJackOrQueenOrKing(Card[] cards,
                                              java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Jack, Queen or King"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### isAce

          protected int[] isAce(Card[] cards,
                                java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)

      Indicates if the hand is a "Ace"
      Parameters:
        `cards` - Cards to be considered
        `cardsSameRank` - List of all cards of the same rank
      Returns:
        int[] positions of cards that should be held

    - #### computeSameRank

          protected java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> computeSameRank(Card[] cards)

      Groups all cards with the same rank in a list that is addressed with the respective rank in a map
      Parameters:
        `cards` - Cards to be considered
      Returns:
        HashMap<Card.Ranks, ArrayList<Integer>> represents a map whose entries correspond to the existing ranks in the group of cards analyzed and each key addresses a list of positions corresponding to cards of that rank in the analyzed vector of cards

    - #### computeSameSuit

          protected java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> computeSameSuit(Card[] cards)

      Groups all cards with the same suit in a list that is addressed with the respective suit in a map
      Parameters:
        `cards` - Cards to be considered
      Returns:
        HashMap<Card.Suits, ArrayList<Integer>> represents a map whose entries correspond to the existing suits in the group of cards analyzed and each key addresses a list of positions corresponding to cards of that suit in the analyzed vector of cards

    - #### computeCandidateStraights

          protected java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> computeCandidateStraights(Card[] cards)

      Computes all possible sequences that could end being a straight. The candidate sequence to become a straight can have zero gaps (is a straight), one gap or two gaps and the last and first cards of the candidate sequence are such as they belong to a sequence of five consecutive cards, i.e., the numerical distance between the last and the first cards of the candidate sequence is less or equal to 4. Also, there are no repeated cards
      Parameters:
        `cards` - Cards to be considered
      Returns:
        HashMap<Integer, ArrayList<ArrayList<Integer>>> Map with 3 entries corresponding to the number of gaps of a sequence candidate to become a straight. Each key addresses a list of lists of coordinates belonging to candidate sequences

    - #### populateWithComutations

          protected java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> populateWithComutations(int[] rt)

      Computes all combinations that can end being a candidate straight. From these, sequences with repeated ranks and sequences whose last card is out of sequence have yet to be removed
      Parameters:
        `rt` - Reorder table addressing the cards under analysis by order of rank
      Returns:
        HashMap<Integer, ArrayList<ArrayList<Integer>>> Map with 3 entries corresponding to the number of gaps of a sequence candidate to become a straight. Each key addresses a list of lists of coordinates that may belong to candidate sequences