# cafe.thunderbird.sevenup.match

> One player's copy of a finished Seven-Up match. Each player saves their own; the record key is the match id (a TID made when the house flips the coin), so the two copies share it. A player against the bot saves alone.

- Kind: record
- Record key: tid
- Authority: sevenup.thunderbird.cafe
- Lexicon: 1
- Published by [thunderbird.cafe](https://lexicon.garden/identity/did:plc:6vxjigxrqizmbo56gojxico3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:6vxjigxrqizmbo56gojxico3/cafe.thunderbird.sevenup.match)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:6vxjigxrqizmbo56gojxico3/cafe.thunderbird.sevenup.match/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:6vxjigxrqizmbo56gojxico3/cafe.thunderbird.sevenup.match/analytics)

## Record (`cafe.thunderbird.sevenup.match`)

Type: record · key tid

### Properties

- `createdAt` (string · datetime, required)
- `firstPlayer` (integer, required): Who the house's coin chose to start.
  - Constraints: minimum: 1, maximum: 2
- `handoffs` (array, required): How the dice changed hands between rounds: granted by the player holding them, or passed by the house after 10 seconds.
  - Constraints: maxLength: 5
  - `items` (string)
    - Constraints: knownValues: granted | auto
- `house` (ref): The house tile that refereed the match (rolled the dice and kept the score).
  - Reference: `com.atproto.repo.strongRef`
- `matchId` (string, required): The match id, also this record's key: a TID made when the house flipped the coin. (Matches saved before Oct 17 2026 have random 13-character ids.)
  - Constraints: minLength: 13, maxLength: 13
- `players` (array, required)
  - Constraints: minLength: 2, maxLength: 2
  - `items` (ref)
    - Reference: `#player`
- `rounds` (array, required): All six rounds in play order, three each, players taking turns.
  - Constraints: minLength: 6, maxLength: 6
  - `items` (ref)
    - Reference: `#round`
- `seat` (integer, required): Which player saved this record (1 or 2, an index into players).
  - Constraints: minimum: 1, maximum: 2
- `summary` (array, required): Each player's totals, in player order. Special rolls are worked out from the rolls.
  - Constraints: minLength: 2, maxLength: 2
  - `items` (ref)
    - Reference: `#summary`

## #player (`cafe.thunderbird.sevenup.match#player`)

Type: object

### Properties

- `bot` (boolean): True when this seat was played by the table's bot.
- `diceStyle` (string, required)
  - Constraints: knownValues: bone | casino | jade | midnight | glow | brick
- `did` (string · did, required)
- `handle` (string · handle, required): The handle at the time of the match, for display; the did is what counts.

## #round (`cafe.thunderbird.sevenup.match#round`)

Type: object

### Properties

- `player` (integer, required)
  - Constraints: minimum: 1, maximum: 2
- `rolls` (array, required): Every roll of the round, two dice each, ending with the first 7.
  - Constraints: minLength: 1
  - `items` (array)
    - Constraints: minLength: 2, maxLength: 2
    - `items` (integer)
      - Constraints: minimum: 1, maximum: 6

## #summary (`cafe.thunderbird.sevenup.match#summary`)

Type: object

### Properties

- `longest` (integer, required): Rolls in the player's longest round.
  - Constraints: minimum: 0
- `quickest` (integer, required): Rolls in the player's quickest round.
  - Constraints: minimum: 0
- `specials` (integer, required): Special rolls (snake eyes, yo-leven, boxcars and the doubles 2 to 5), never counting the closing 7.
  - Constraints: minimum: 0

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One player's copy of a finished Seven-Up match. Each player saves their own; the record key is the match id (a TID made when the house flips the coin), so the two copies share it. A player against the bot saves alone.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "firstPlayer": {
            "description": "Who the house's coin chose to start.",
            "maximum": 2,
            "minimum": 1,
            "type": "integer"
          },
          "handoffs": {
            "description": "How the dice changed hands between rounds: granted by the player holding them, or passed by the house after 10 seconds.",
            "items": {
              "knownValues": [
                "granted",
                "auto"
              ],
              "type": "string"
            },
            "maxLength": 5,
            "type": "array"
          },
          "house": {
            "description": "The house tile that refereed the match (rolled the dice and kept the score).",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "matchId": {
            "description": "The match id, also this record's key: a TID made when the house flipped the coin. (Matches saved before Oct 17 2026 have random 13-character ids.)",
            "maxLength": 13,
            "minLength": 13,
            "type": "string"
          },
          "players": {
            "items": {
              "ref": "#player",
              "type": "ref"
            },
            "maxLength": 2,
            "minLength": 2,
            "type": "array"
          },
          "rounds": {
            "description": "All six rounds in play order, three each, players taking turns.",
            "items": {
              "ref": "#round",
              "type": "ref"
            },
            "maxLength": 6,
            "minLength": 6,
            "type": "array"
          },
          "seat": {
            "description": "Which player saved this record (1 or 2, an index into players).",
            "maximum": 2,
            "minimum": 1,
            "type": "integer"
          },
          "summary": {
            "description": "Each player's totals, in player order. Special rolls are worked out from the rolls.",
            "items": {
              "ref": "#summary",
              "type": "ref"
            },
            "maxLength": 2,
            "minLength": 2,
            "type": "array"
          }
        },
        "required": [
          "matchId",
          "seat",
          "players",
          "firstPlayer",
          "rounds",
          "handoffs",
          "summary",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "player": {
      "properties": {
        "bot": {
          "description": "True when this seat was played by the table's bot.",
          "type": "boolean"
        },
        "diceStyle": {
          "knownValues": [
            "bone",
            "casino",
            "jade",
            "midnight",
            "glow",
            "brick"
          ],
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "description": "The handle at the time of the match, for display; the did is what counts.",
          "format": "handle",
          "type": "string"
        }
      },
      "required": [
        "did",
        "handle",
        "diceStyle"
      ],
      "type": "object"
    },
    "round": {
      "properties": {
        "player": {
          "maximum": 2,
          "minimum": 1,
          "type": "integer"
        },
        "rolls": {
          "description": "Every roll of the round, two dice each, ending with the first 7.",
          "items": {
            "items": {
              "maximum": 6,
              "minimum": 1,
              "type": "integer"
            },
            "maxLength": 2,
            "minLength": 2,
            "type": "array"
          },
          "minLength": 1,
          "type": "array"
        }
      },
      "required": [
        "player",
        "rolls"
      ],
      "type": "object"
    },
    "summary": {
      "properties": {
        "longest": {
          "description": "Rolls in the player's longest round.",
          "minimum": 0,
          "type": "integer"
        },
        "quickest": {
          "description": "Rolls in the player's quickest round.",
          "minimum": 0,
          "type": "integer"
        },
        "specials": {
          "description": "Special rolls (snake eyes, yo-leven, boxcars and the doubles 2 to 5), never counting the closing 7.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "longest",
        "quickest",
        "specials"
      ],
      "type": "object"
    }
  },
  "description": "Seven-Up, a two-player dice game played with web tiles at thunderbird.cafe/webtiles/sevenup/.",
  "id": "cafe.thunderbird.sevenup.match",
  "lexicon": 1
}
```
