F090 — Horse Name Nicknames
Business Rule
In HedgeEm v7 (horse race skin), each poker hand is represented as a horse. The horse’s name is the industry-standard poker nickname for that starting hand combination. For example, a hand of Ace-Ace is called “Pocket Rockets”, King-King is “Cowboys”, and the notoriously weak 7-2 offsuit is known as “Beer Hand”. Where an established nickname exists (per Wikipedia’s List of poker playing card nicknames), that name is used. Where no standard nickname exists, a racing-appropriate invented name fills the gap. Version applicability: V7 only. JS, TypeScript (v6), and UMA use generic hand labels.Technical Design
Input
A 4-character hand string fromGameRecord.hands[], e.g.:
"AcKd"— Ace of clubs, King of diamonds"7c2d"— Seven of clubs, Two of diamonds"AcAd"— Ace of clubs, Ace of diamonds (pair)
Output
A string horse name, e.g."Big Slick", "Beer Hand", "Pocket Rockets".
Algorithm
- Parse
rank1 = hand[0],suit1 = hand[1],rank2 = hand[2],suit2 = hand[3] - If
rank1 === rank2: key =rank1 + rank2(pair, e.g."AA") - If
rank1 !== rank2:- Determine higher/lower rank using
RANK_ORDER suited = (suit1 === suit2)- key =
higherRank + lowerRank + ('s' | 'o')(e.g."AKs","72o")
- Determine higher/lower rank using
- Look up key in
HORSE_NAMEStable; return fallback if missing
Source File
src/data/horseNames.ts in hedgeem-v7 repo.
The 169-Hand Table
Pairs (13)
Suited Non-Pairs (78)
Offsuit Non-Pairs (78)
Acceptance Criteria
AC1:getHorseName("AcAd") returns "Pocket Rockets"
AC2: getHorseName("KcKd") returns "Cowboys"
AC3: getHorseName("7c2d") returns "Beer Hand" (72 offsuit — worst hand in poker)
AC4: getHorseName("AcKc") returns "Big Slick" (AK suited)
AC5: getHorseName("AcKd") returns "Walking Back to Houston" (AK offsuit)
AC6: All 169 hand combinations return a non-empty string
AC7: Function handles both card orderings (e.g. "KdAc" same as "AcKd")
AC8: Horse name rendered in the CardLanePanel label for each lane