> ## Documentation Index
> Fetch the complete documentation index at: https://hedgeem-api.qeetoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Data

> The 17 demo game records used as test oracles

## Overview

The test harness uses 17 fixed game records sourced from `coredata.ts` in the v6 client. Each record provides known card data (hole cards + community cards) that is submitted to the live server, which evaluates odds fresh. The oracle values in `demo-records.ts` supply ground-truth for deterministic assertions (`statusIsFavourite`, `statusIsWinner`, `statusCantLose`).

All 17 records are 4-hand games. Community cards are revealed progressively: 3 at FLOP, 1 at TURN, 1 at RIVER (the standard Texas Hold'Em community structure).

***

## Demo 1 — A typical 'Promo' game

**Cards:** KdKc · 7d3d · 5s5c · JhQc
**Board:** 5h 3h 4h | Qd | As
**What this tests:** A standard asymmetric game where one hand (pocket fives) dramatically improves on the flop and runs away with it. The favourite switches from the pre-flop leader (KK) to the three-of-a-kind on the flop.

| Stage | Winner                   | Key event                        |
| ----- | ------------------------ | -------------------------------- |
| HOLE  | Hand 0 (KK) is favourite | KK has highest pre-flop equity   |
| FLOP  | Hand 2 (5s5c) takes lead | Flop brings 5h — three of a kind |
| TURN  | Hand 2 maintains lead    | Qd doesn't help others           |
| RIVER | Hand 2 wins              | Three of a kind holds            |

***

## Demo 2 — All hands have action

**Cards:** AdAs · 6c4d · JhQh · 3cJd
**Board:** Jc 6h 3h | 6s | 3d
**What this tests:** Every hand improves meaningfully. The flop hits multiple hands simultaneously, making the favourite calculation close. The winner emerges only at the turn when one hand pulls decisively ahead.

| Stage | Winner                   | Key event                   |
| ----- | ------------------------ | --------------------------- |
| HOLE  | Hand 0 (AA) is favourite | Strongest pre-flop holding  |
| FLOP  | Hand 2 (JhQh) leads      | Pair of Jacks after Jc flop |
| TURN  | Hand 1 (6c4d) takes over | Three of a kind with 6s     |
| RIVER | Hand 1 wins              | Full house                  |

<Note>
  **8 failures in this demo** — FLOP hands 0 and 2. The oracle records hand 0 (Pair of Aces, 7.07%) as the favourite over hand 2 (Pair of Jacks, 45%). The server correctly identifies hand 2 as the favourite by win probability. This is a v4 C# oracle vs v6 Node.js tiebreaker discrepancy. See [Test Results](/testing/results) for details.
</Note>

***

## Demo 3 — Emotional openers!

**Cards:** Th8d · 9s2h · KcKs · 5h8s
**Board:** 7h 2c 2d | Td | Ts
**What this tests:** An "emotional" pre-flop — the pocket Kings are heavily favoured but the board pairs twos and then tens, giving the 9s2h hand an unexpected three-of-a-kind. The eventual winner (Th8d) makes a full house on the river, beating the three-of-a-kind.

| Stage | Winner                   | Key event                             |
| ----- | ------------------------ | ------------------------------------- |
| HOLE  | Hand 2 (KK) is favourite | \~67% equity                          |
| FLOP  | Hand 1 (9s2h) takes over | Three of a kind (222)                 |
| TURN  | Hand 1 still leads       | Td gives hand 0 two pair              |
| RIVER | Hand 0 wins              | Fullhouse (T T T 2 2 beats 2 2 2 T T) |

***

## Demo 4 — Hedge'Em opportunity

**Cards:** Qd3d · 2hQs · 7cKs · 2cAc
**Board:** Kc 7h Tc | Jd | 9s
**What this tests:** A classic hedge scenario. Two hands (0 and 1) are both low-probability outsiders throughout, then both hit a surprise straight on the river. Tests the two-winner scenario and `statusIsWinner: true` on multiple hands at RIVER.

| Stage | Winner                     | Key event                 |
| ----- | -------------------------- | ------------------------- |
| HOLE  | Hand 3 (2cAc) is favourite | Ace high, best equity     |
| FLOP  | Hand 2 (7cKs) leads        | Two pair (K K 7 7)        |
| TURN  | Hand 2 still favourite     | Straight draw developing  |
| RIVER | Hands 0 and 1 both win     | Both hit Q-J-T-9 straight |

***

## Demo 5 — Hedge your bets!

**Cards:** 8d8h · ThJh · 3s6d · JdJc
**Board:** 8s 6h 6c | Kh | 2s
**What this tests:** The flop produces a dramatic swing — the 8d8h hand makes a full house (8-8-8-6-6) on the flop and becomes heavily favoured. Tests `statusCantLose` approaching but not reaching threshold on flop, then majority of community cards land.

| Stage | Winner                   | Key event          |
| ----- | ------------------------ | ------------------ |
| HOLE  | Hand 3 (JJ) is favourite | \~54% equity       |
| FLOP  | Hand 0 (8d8h) dominates  | Full house: 88866  |
| TURN  | Hand 0 at 95%            | Dead hands: 1 (6s) |
| RIVER | Hand 0 wins              | Full house holds   |

***

## Demo 6 — Back from the dead

**Cards:** Ac5c · 9c6d · JdJh · 7sQh
**Board:** Qc 7c Jc | Tc | 8c
**What this tests:** A "back from the dead" story — hand 1 (9c6d) appears nearly eliminated after the flop but hits a straight flush on the river, beating the ace-high flush. Tests correct winner determination when a lower-ranked hand makes a dramatic improvement.

| Stage | Winner                   | Key event                                     |
| ----- | ------------------------ | --------------------------------------------- |
| HOLE  | Hand 2 (JJ) is favourite | Strong pocket pair                            |
| FLOP  | Hand 0 (Ac5c) leads      | Ace-high flush                                |
| TURN  | Hand 0 still leads       | Board draws strengthen flush                  |
| RIVER | Hand 1 wins              | Straight flush 6c-7c-8c-9c-Tc beats ace flush |

***

## Demo 7 — Maximum and Minimum Odds

**Cards:** Ah2h · 9h6d · 4c2c · 3s9c
**Board:** Qh 7h Jh | Th | 8h
**What this tests:** The full community is hearts. Hand 0 (Ah2h) has the ace of hearts making an ace-high flush, while hand 1 (9h6d) has the nine of hearts. The board completes a straight flush for hand 1. Tests near-zero odds (hands 2 and 3 are dead from the flop) and correct winner at RIVER.

| Stage | Winner                     | Key event                                              |
| ----- | -------------------------- | ------------------------------------------------------ |
| HOLE  | Hand 0 (Ah2h) is favourite | Ace of hearts — board is all hearts                    |
| FLOP  | Hand 0 at 99.88%           | Near-certainty (ace-high flush)                        |
| TURN  | Hand 0 at 97.5%            | Hand 1 still has one out (9h completes straight flush) |
| RIVER | Hand 1 wins                | 9h completes straight flush to Queen                   |

***

## Demo 8 — One hand can't lose

**Cards:** 3d9s · 5c6d · QhQs · 3h8h
**Board:** 4c 3s 5d | 2h | 7c
**What this tests:** `statusCantLose` — when a hand reaches 100% win probability. At the turn, hand 1 (5c6d) makes a wheel straight (A-2-3-4-5) which cannot be beaten by the remaining river card. Tests that `statusCantLose: true` is set and odds assertions are skipped for that hand.

| Stage | Winner                   | Key event                         |
| ----- | ------------------------ | --------------------------------- |
| HOLE  | Hand 2 (QQ) is favourite | \~65% equity                      |
| FLOP  | Hand 1 (5c6d) gains      | Pair of fives with straight draw  |
| TURN  | Hand 1 at 100%           | Straight 2h-3s-4c-5d-6d: cantLose |
| RIVER | Hand 1 wins              | Straight holds                    |

<Note>
  **8 failures in this demo** — FLOP hands 1 and 2. See [Test Results](/testing/results) for details.
</Note>

***

## Demo 9 — Everyone's a winner!

**Cards:** KdAh · 4c4s · JhQh · 6d7s
**Board:** 6h 4h 7c | 5d | 8s
**What this tests:** All four hands are winners at RIVER — they all share the same board straight (6-7-8-9-T or similar). Tests `statusIsWinner: true` on all four hands simultaneously and `gameOver: true`.

| Stage | Winner                     | Key event                                 |
| ----- | -------------------------- | ----------------------------------------- |
| HOLE  | Hand 0 (KdAh) is favourite | Overcards                                 |
| FLOP  | Hand 1 (4c4s) leads        | Three of a kind                           |
| TURN  | Hand 1 still favourite     | Straight draws developing                 |
| RIVER | All 4 hands win            | Board completes shared straight 5-6-7-8-9 |

***

## Demo 10 — All bets off!

**Cards:** 6c6s · AdKc · JhQh · 2c7s
**Board:** 6d 6h 9c | Qs | Ks
**What this tests:** Four-of-a-kind on the flop — hand 0 (6c6s) makes quad sixes immediately and hits `statusCantLose: true` from the flop onwards. The other hands are instantly dead. Tests cantLose trigger on the flop (not just turn) and dead hand detection.

| Stage | Winner                     | Key event                   |
| ----- | -------------------------- | --------------------------- |
| HOLE  | Hand 2 (JhQh) is favourite | \~33% equity (even field)   |
| FLOP  | Hand 0 at 100%             | Four of a kind 6s: cantLose |
| TURN  | Hand 0 still cantLose      | Board pairs don't matter    |
| RIVER | Hand 0 wins                | Quads hold                  |

***

## Demo 11 — All community-cards are the best five

**Cards:** KcJs · Qd4c · 3sJd · Jc7c
**Board:** 7h 6h 8h 9h Th
**What this tests:** The five community cards form a straight flush (6h-7h-8h-9h-Th), which is the best possible five-card hand regardless of hole cards. All four hands end up playing the board — `statusIsWinner: true` on all four at RIVER. Tests the board-plays scenario.

| Stage | Winner                     | Key event                       |
| ----- | -------------------------- | ------------------------------- |
| HOLE  | Hand 0 (KcJs) is favourite | \~41% equity                    |
| FLOP  | Hand 3 (Jc7c) leads        | Pair of sevens improves odds    |
| TURN  | Hand 3 still leads         | Straight flush forming on board |
| RIVER | All 4 hands win            | Board straight flush 6-7-8-9-T  |

***

## Demo 12 — Highlighting best cards

**Cards:** 8hJs · Jh4c · 9sJd · Jc7c
**Board:** 7d 8s 8c 9d Th
**What this tests:** Multiple jacks in the hole — the board eventually forms a straight (7-8-9-T-J), and all four hands have a Jack to complete it. All four hands win. Also tests `statusCantLose: true` appearing at TURN for two hands.

| Stage | Winner                     | Key event                 |
| ----- | -------------------------- | ------------------------- |
| HOLE  | Hand 2 (9sJd) is favourite | \~43% equity              |
| FLOP  | Hand 0 (8hJs) leads        | Three of a kind 8s        |
| TURN  | Hand 0 nearly certain      | 95%, cantLose approaching |
| RIVER | All 4 hands win            | Straight 7-8-9-T-J        |

***

## Demo 13 — Game-over after Flop

**Cards:** AsKs · Jd9c · 2h4c · 8sAh
**Board:** Ts Js Qs | 3h | 6d
**What this tests:** Game can end after the flop — hand 0 (AsKs) makes a Royal Flush (As-Ks-Qs-Js-Ts) on the flop and hits `statusCantLose: true`. All other hands are dead. The game effectively concludes at the flop even though TURN and RIVER still resolve.

| Stage | Winner                     | Key event                     |
| ----- | -------------------------- | ----------------------------- |
| HOLE  | Hand 0 (AsKs) is favourite | \~39% equity                  |
| FLOP  | Hand 0 at 100%             | Royal Flush: cantLose         |
| TURN  | Hand 0 still cantLose      | Board doesn't change the hand |
| RIVER | Hand 0 wins                | Royal Flush holds             |

***

## Demo 14 — Game-over after Turn

**Cards:** AsKs · Jd9c · 2h4c · 8sAh
**Board:** Ts Js 3h | Qs | 6d
**What this tests:** Same hole cards as Demo 13, but community order is different — the straight flush doesn't complete until the turn card (Qs). Tests `statusCantLose` activating at TURN rather than FLOP.

| Stage | Winner                       | Key event                |
| ----- | ---------------------------- | ------------------------ |
| HOLE  | Hand 0 (AsKs) is favourite   | \~39% equity             |
| FLOP  | Hand 0 leads but not certain | Ace high, straight draws |
| TURN  | Hand 0 at 100%               | Qs completes Royal Flush |
| RIVER | Hand 0 wins                  | Royal Flush holds        |

***

## Demo 15 — All Equal from start

**Cards:** KsAd · KhAs · KcAh · KdAc
**Board:** Ts Jd Qh | 3h | 3d
**What this tests:** All four hands are identical — each has AK suited in a different suit. From the flop, all four are dealt a shared straight (T-J-Q-K-A) so all four `statusCantLose` and all four win. Tests the equal-probability scenario at HOLE, and the all-cantLose scenario from FLOP onwards.

| Stage | Winner                 | Key event            |
| ----- | ---------------------- | -------------------- |
| HOLE  | All equal (\~97% each) | Identical hole cards |
| FLOP  | All 4 cantLose         | Shared straight      |
| TURN  | All 4 cantLose         | —                    |
| RIVER | All 4 win              | Shared straight      |

<Note>
  **8 failures in this demo** — HOLE hands 0 and 2. All four hands are truly identical in equity. The oracle assigns `statusIsFavourite: true` to hand 0 (first index wins tiebreaker in v4 C#). The v6 server uses a different tiebreaker. See [Test Results](/testing/results).
</Note>

***

## Demo 16 — All Equal but not for long (v2)

**Cards:** KsAd · KhAs · KcAh · KdAc
**Board:** 6s 8s 2s | 8c | 3d
**What this tests:** Identical hole cards again, but the community is very different from Demo 15. At FLOP, hand 1 (KhAs) has the ace of spades making an ace-high flush — `statusCantLose`. The others are drawing but behind. Tests the scenario where identical hole cards diverge in value depending on which suit matches the board.

| Stage | Winner                 | Key event                              |
| ----- | ---------------------- | -------------------------------------- |
| HOLE  | All equal (\~97% each) | Identical hole cards                   |
| FLOP  | Hand 1 (KhAs) at 100%  | As completes cantLose ace flush        |
| TURN  | Hand 1 still cantLose  | Board pair (88) doesn't hurt flush     |
| RIVER | All 4 win              | All make Pair of Eights (shared board) |

<Note>
  **8 failures in this demo** — HOLE hands 0 and 3. See [Test Results](/testing/results).
</Note>

***

## Demo 17 — All Equal but not for long (v1)

**Cards:** KsAd · KhAs · KcAh · KdAc
**Board:** 6s 8s 8c | 2s | 3d
**What this tests:** Same hole cards and same community as Demo 16, but with bc3 and bc4 swapped (8c comes before 2s). The flush completes at the flop not the turn. Tests that card ordering within a stage matters — the same cards in a different order can change when cantLose is triggered.

| Stage | Winner                 | Key event                                  |
| ----- | ---------------------- | ------------------------------------------ |
| HOLE  | All equal (\~97% each) | Identical hole cards                       |
| FLOP  | Hand 1 (KhAs) cantLose | As completes ace flush (6s 8s 8c on board) |
| TURN  | Hand 1 still cantLose  | 2s arrives (board spades)                  |
| RIVER | All 4 win              | Pair of Eights on board                    |

***

## Summary Table

| #  | Label                                 | Hands               | Special feature                |
| -- | ------------------------------------- | ------------------- | ------------------------------ |
| 1  | A typical 'Promo' game                | KK · 73s · 55 · QJ  | Standard asymmetric            |
| 2  | All hands have action                 | AA · 64 · QJ · J3   | Multiple improvements          |
| 3  | Emotional openers!                    | T8 · 92 · KK · 85   | Surprise set / runner-runner   |
| 4  | Hedge'Em opportunity                  | Q3 · 2Q · K7 · A2   | Two-way split pot at RIVER     |
| 5  | Hedge your bets!                      | 88 · TJ · 36 · JJ   | Full house on flop             |
| 6  | Back from the dead                    | A5c · 96c · JJ · Q7 | Straight flush beats ace flush |
| 7  | Maximum and Minimum Odds              | A2h · 96 · 42 · 39  | Near-zero odds; SF on river    |
| 8  | One hand can't lose                   | 39 · 56 · QQ · 38   | cantLose at TURN               |
| 9  | Everyone's a winner!                  | KA · 44 · QJ · 67   | All 4 win at RIVER             |
| 10 | All bets off!                         | 66 · AK · QJ · 27   | Quad 6s: cantLose at FLOP      |
| 11 | All community-cards are the best five | KJ · Q4 · 3J · J7   | Board straight flush           |
| 12 | Highlighting best cards               | 8J · J4 · 9J · J7   | All share board straight       |
| 13 | Game-over after Flop                  | AKs · J9 · 24 · 8A  | Royal Flush at FLOP            |
| 14 | Game-over after Turn                  | AKs · J9 · 24 · 8A  | Royal Flush at TURN            |
| 15 | All Equal from start                  | AK × 4              | Shared straight; all cantLose  |
| 16 | All Equal but not for long (v2)       | AK × 4              | Flush diverges hands           |
| 17 | All Equal but not for long (v1)       | AK × 4              | Same as 16, cards reordered    |
