PokerHandComparator

Part of an university project for an online poker game. Based on the information provided on https://www.partypoker.com/en/how-to-play/hand-rankings, the application takes two sets of five Card Objects each to determine which has the higher value and would win in a round of poker.

Poker hands (ascending):

HIGH_CARD: highest card in the hand
PAIR: two cards of the same rank
TWO_PAIRS: two cards of one value and another two cards of another value
THREE_OF_A_KIND: three cards of the same rank
STRAIGHT: five card sequence
FLUSH: five cards of the same suit
FULL_HOUSE: three cards of one value and a pair of another value
FOUR_OF_A_KIND: four cards of one value
STRAIGHT_FLUSH: five cards sequence of the same suit
ROYAL_FLUSH: straight flush with ace as highest rank

Rules

Ace can come both after the king and before two.
If two player have the same hand, higher rank wins. If both have the same rank as highest, suit decides

Rank of suits (ascending): Diamonds, Hearts, Spades, Clubs