import { HAND_CATEGORIES } from "./evaluator"; import type { HandRank } from "./types"; /** * Presentation tier for a made hand: 0 (high card, no styling) through * 9 (royal flush, full prismatic treatment). Each step up the ladder gets a * more intense border and glow; see the poker-rank-tier-* rules in styles.css. */ export const ROYAL_RANK_TIER = 9; export function handRankTier(hand: HandRank): number { const royal = hand.category === HAND_CATEGORIES.STRAIGHT_FLUSH && hand.tiebreakers[0] === 14; return royal ? ROYAL_RANK_TIER : hand.category; } export function handRankTierClass(tier: number): string { return `poker-rank-tier-${tier}`; }