Uses of Class game_backend.Card
Date: 2017-05-13

## Uses of Class
game_backend.Card

- Packages that use Card
  Package | Description
  --- | ---
  game_backend |
  game_frontend |

- - ### Uses of Card in game_backend

    Fields in game_backend declared as Card
    Modifier and Type | Field and Description
    --- | ---
    `private Card[]` | Hand.`cards`

    Fields in game_backend with type parameters of type Card
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.ArrayList<Card>` | Deck.`deck`

    Methods in game_backend that return Card
    Modifier and Type | Method and Description
    --- | ---
    `Card[]` | Play.`deal(int credits)`
    `Card[]` | Game.`deal(int credits)` Receives certain amount and retrieves five cards
    `Card` | Hand.`getCard(int card)` Returns the reference for the card in a given position without removing it from the hand
    `Card` | Deck.`removeCard()` Removes a card from the beginning of the deck
    `Card` | Hand.`retrieveCard(int card)` Retrieves card of a given position in hand
    `Card[]` | Play.`retrieveCards(int n)`
    `Card[]` | Game.`retrieveCards(int n)` Retrieves cards from deck
    `Card[]` | Player.`retrieveCards(int[] cards)` Retrieves cards from the player's hand that are at the positions indicated
    `Card[]` | Player.`showHand()` Shows the references of the cards present in player's hand

    Methods in game_backend with parameters of type Card
    Modifier and Type | Method and Description
    --- | ---
    `void` | Deck.`addCard(Card card)` Adds a card to the end of the deck
    `abstract int[]` | PokerRules.`advice(Card[] cards)` Abstract method.
    `int[]` | PlayVariant.`advice(Card[] cards)`
    `int[]` | Play.`advice(Card[] cards)`
    `int[]` | Game.`advice(Card[] cards)` For a given hand, retrieves the cards that should be held in order to achieve the maximum gain (greedy way)
    `int[]` | DoubleBonus.`advice(Card[] cards)` Implements the strategy for this variant of Poker.
    `int` | Card.`compareTo(Card card)` Provides a comparable method for type card.
    `protected java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>>` | PokerRules.`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>>` | PokerRules.`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>>` | PokerRules.`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` | PokerRules.`evaluateHand(Card[] cards)` Abstract method.
    `java.lang.String` | PlayVariant.`evaluateHand(Card[] cards)`
    `java.lang.String` | Play.`evaluateHand(Card[] cards)`
    `java.lang.String` | Game.`evaluateHand(Card[] cards)` Returns the name of the awarded hand by asking what is it to its variant, if it exists, otherwise returns null
    `java.lang.String` | DoubleBonus.`evaluateHand(Card[] cards)` Returns the name of the awarded hand if it exists, otherwise returns null
    `protected int[]` | PokerRules.`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[]` | PokerRules.`isAce(Card[] cards, java.util.HashMap<Card.Ranks,java.util.ArrayList<java.lang.Integer>> cardsSameRank)` Indicates if the hand is a "Ace"
    `protected int[]` | PokerRules.`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[]` | PokerRules.`isFlush(Card[] cards, java.util.HashMap<Card.Suits,java.util.ArrayList<java.lang.Integer>> cardsSameSuit)` Indicates if the hand is a "Flush"
    `protected int[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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[]` | PokerRules.`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"
    `int` | Card.`minus(Card card)` Provides the true comparable between ranks.
    `void` | Player.`receiveCards(Card[] cards)` Save cards passed by argument in player's hand
    `void` | Play.`receiveCards(Card[] cards)`
    `void` | Game.`receiveCards(Card[] cards)` Puts the received cards in deck
    `void` | Hand.`saveCard(Card card)` Puts a card in the first empty position in hand

    Constructor parameters in game_backend with type arguments of type Card
    Constructor and Description
    `Deck(java.util.ArrayList<Card> cards)` Constructor for Deck.
    `Game(PlayVariant variant, java.util.ArrayList<Card> cards)` Constructor of Game in which a list of cards is supplied

  - ### Uses of Card in game_frontend

    Fields in game_frontend declared as Card
    Modifier and Type | Field and Description
    --- | ---
    `protected Card[]` | Match.`discarded`

    Constructor parameters in game_frontend with type arguments of type Card
    Constructor and Description
    `Debug(int credits, java.util.ArrayList<Card> cards, java.util.ArrayList<java.lang.String> commands)` Constructor of Debug
    `Match(int credits, java.util.ArrayList<Card> cards)` Constructor of Match that receives the cards to be loaded into deck