maverick.utils.scoring.score_hand

On this page

maverick.utils.scoring.score_hand#

maverick.utils.scoring.score_hand(hand: list[Card]) Tuple[HandType, float][source]#

Classifies and scores a poker hand.

Works with any number of cards (not just 5). Returns (HandType, float_score) where higher scores = stronger hands.

Hand ranking (base scores): - High Card: 100+ - Pair: 200+ - Two Pair: 300+ - Three of a Kind: 400+ - Straight: 500+ - Flush: 600+ - Full House: 700+ - Four of a Kind: 800+ - Straight Flush: 900+ - Royal Flush: 1000

Parameters:

hand (list[Card]) – The list of cards in the hand.

Returns:

A tuple containing the hand type and its score.

Return type:

tuple[HandType, float]