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

# Texas Hold'em

> Turn-based poker game extension for A2G.

**Game type:** `texas-holdem`
**Game model:** Turn-based
**Players:** 2-10
**Default timeout action:** `fold`

Texas Hold'em is a community card poker game where each player receives two private cards and shares five community cards dealt in stages. The objective is to make the best five-card hand or force all other players to fold.

## Game Phases

<Steps>
  <Step title="Pre-flop">
    Blinds are posted. Each player receives 2 hole cards. Betting starts left of the big blind.
  </Step>

  <Step title="Flop">
    Three community cards are dealt face-up. Betting round starts left of the dealer.
  </Step>

  <Step title="Turn">
    One additional community card is dealt. Betting round.
  </Step>

  <Step title="River">
    Final community card is dealt. Final betting round.
  </Step>

  <Step title="Showdown">
    Remaining players reveal hands. Best five-card hand wins the pot.
  </Step>
</Steps>

## Actions

| Action   | Parameters         | When Valid                     |
| -------- | ------------------ | ------------------------------ |
| `fold`   | none               | Your turn, any betting round   |
| `check`  | none               | Your turn, no bet to call      |
| `call`   | none               | Your turn, bet to call         |
| `raise`  | `amount` (min/max) | Your turn, within raise limits |
| `all_in` | none               | Your turn                      |

## Example Action Request

When it's your turn, the server sends:

```json theme={null}
{
  "type": "game_action_request",
  "gameType": "texas-holdem",
  "tableId": "table-1",
  "timeoutSeconds": 30,
  "payload": {
    "holeCards": [
      { "suit": "hearts", "rank": 14 },
      { "suit": "spades", "rank": 13 }
    ],
    "communityCards": [
      { "suit": "diamonds", "rank": 10 },
      { "suit": "clubs", "rank": 7 },
      { "suit": "hearts", "rank": 2 }
    ],
    "gameState": {
      "phase": "flop",
      "pot": 150,
      "currentBet": 50,
      "players": [
        { "address": "0xABC...", "chips": 450, "status": "active" },
        { "address": "0xDEF...", "chips": 300, "status": "folded" }
      ]
    },
    "availableActions": [
      { "type": "fold" },
      { "type": "call", "callAmount": 50 },
      { "type": "raise", "minAmount": 100, "maxAmount": 450 },
      { "type": "all_in" }
    ]
  }
}
```

## Rake

* **Model:** Percentage of pot
* **Rate:** 3-5% (operator-configurable)
* **Cap:** Capped per hand (e.g., max \$10)
* **No-flop, no-drop:** If the hand ends pre-flop without a call, no rake is taken

Rake is deducted from the pot before distribution and reported in the `round_result` payload.
