# games.cavu.tier-madness.defs

> Published by [chris.pardy.family](https://lexicon.garden/identity/did:plc:dp7v5b5kejmmzzpwmqyf5wj6)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.tier-madness.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.tier-madness.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.tier-madness.defs/examples)

## Definitions

### `games.cavu.tier-madness.defs#award`

**Type**: `object`

An end-of-game superlative and the bonus points it paid.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `blurb` | `string` | Yes |  |
| `id` | `string` | Yes |  |
| `points` | `integer` | Yes | Points to each winner. |
| `title` | `string` | Yes |  |
| `winners` | `array` | Yes | Everyone tied for it. |

### `games.cavu.tier-madness.defs#cardPoints`

**Type**: `object`

Points one card scored for the viewer against the other players.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `item` | `string` | Yes |  |
| `points` | `integer` | Yes |  |

### `games.cavu.tier-madness.defs#cardResult`

**Type**: `object`

How one card scored for the viewer.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `doubled` | `boolean` | No |  |
| `fromPlayers` | `integer` | Yes | The part of `points` scored against the other players, already counted during the reveal. |
| `group` | `ref` → `#tier` | Yes |  |
| `item` | `string` | Yes |  |
| `points` | `integer` | Yes |  |
| `yours` | `ref` → `#tier` | Yes |  |

### `games.cavu.tier-madness.defs#gamePlayer`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `initials` | `string` | Yes |  |

### `games.cavu.tier-madness.defs#gameView`

**Type**: `object`

The game as one viewer may see it. Secrets (other players' moves, items not yet dealt to this viewer) are left out until revealed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `awards` | `array` | No | The end-of-game superlatives (bonus phase on): who won each, and the points it paid them. |
| `ballot` | `array` | No | Categories to vote on (vote phase). |
| `category` | `string` | No |  |
| `code` | `string` | No | The join code, for players and spectators (who already know it). |
| `criteria` | `string` | No |  |
| `criteriaOptions` | `array` | No |  |
| `criteriaPicker` | `string` (did) | No |  |
| `deadline` | `integer` | No | When the server stops waiting on stalled players (ms since epoch), if it's counting down. |
| `game` | `string` | Yes |  |
| `group` | `array` | No | The group's median list (final phase). |
| `hand` | `array` | No | Cards this viewer may see: during the deal, a player's cards so far (the next is dealt once the previous placement is committed); from the reveal on, the whole round, for everyone. |
| `host` | `string` (did) | No |  |
| `joinable` | `boolean` | No | Whether the lobby still takes players. |
| `mine` | `ref` → `#mine` | No |  |
| `phase` | `ref` → `#phase` | Yes |  |
| `players` | `array` | Yes |  |
| `rematch` | `ref` → `#rematch` | No | Game over: the rematch someone started, while it still takes players. |
| `results` | `array` | No | After the reveal: how each of the viewer's cards scored. |
| `reveal` | `ref` → `#reveal` | No |  |
| `revealIndex` | `integer` | No | Reveal phase: which card (in deal order) is being revealed. |
| `revealPoints` | `array` | No | Reveal phase: the viewer's points against the other players, for each card revealed so far. |
| `reveals` | `array` | No | Spectators, once a round is revealed: every item's picks at once, so a spectator screen can play the reveal on timers instead of following the host. |
| `round` | `integer` | Yes |  |
| `totalRounds` | `integer` | Yes |  |
| `viewer` | `ref` → `#viewer` | Yes |  |

### `games.cavu.tier-madness.defs#item`

**Type**: `object`

A card, sourced from a Wikipedia article.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `extract` | `string` | No |  |
| `id` | `string` | Yes |  |
| `imageUrl` | `string` (uri) | No |  |
| `name` | `string` | Yes |  |
| `sourceUrl` | `string` (uri) | No |  |
| `summary` | `string` | Yes |  |

### `games.cavu.tier-madness.defs#mine`

**Type**: `object`

The viewer's own round so far (only ever sent to that player).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `double` | `string` | No |  |
| `doubleChosen` | `boolean` | No |  |
| `placements` | `array` | Yes | As placed, before any swap. |
| `swap` | `array` | No | The swap, once chosen ([] = skipped). |
| `swapChosen` | `boolean` | No |  |

### `games.cavu.tier-madness.defs#phase`

**Type**: `string`

**Known Values**:
- `lobby`
- `vote`
- `pickCriteria`
- `deal`
- `swap`
- `double`
- `waiting`
- `reveal`
- `final`
- `scores`
- `bonus`
- `gameover`

### `games.cavu.tier-madness.defs#placement`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `item` | `string` | Yes |  |
| `tier` | `ref` → `#tier` | Yes |  |

### `games.cavu.tier-madness.defs#player`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bot` | `boolean` | No | Played by the server (a Jev bot), not a person. |
| `connected` | `boolean` | No |  |
| `did` | `string` (did) | Yes |  |
| `forfeit` | `boolean` | No | This round's moves didn't verify, so they don't count. |
| `host` | `boolean` | No |  |
| `initials` | `string` | Yes |  |
| `progress` | `integer` | Yes | Moves committed this phase, for 'waiting on…' indicators. |
| `roundPoints` | `integer` | No | Points from the last scored round (may be negative). |
| `score` | `integer` | Yes |  |
| `scoreAfter` | `integer` | No | While a round or the end-of-game bonus is being revealed: this player's total once it's banked, so a spectator screen can play it out on its own clock. |

### `games.cavu.tier-madness.defs#prompt`

**Type**: `object`

What a rating answers, embedded rather than written as a garden.lexicon.dazzling-boarfish.rating.prompt record. Its scale is the game's.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `langs` | `array` | No |  |
| `text` | `string` | Yes |  |

### `games.cavu.tier-madness.defs#rematch`

**Type**: `object`

A rematch lobby for the same table.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string` | Yes |  |
| `host` | `string` (did) | Yes |  |

### `games.cavu.tier-madness.defs#reveal`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `item` | `ref` → `#item` | Yes |  |
| `votes` | `array` | Yes |  |

### `games.cavu.tier-madness.defs#scale`

**Type**: `object`

A rating scale, embedded rather than written as a garden.lexicon.dazzling-boarfish.rating.scale record: the same fields, minus record bookkeeping.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `union` | Yes |  |
| `description` | `string` | No |  |
| `langs` | `array` | No |  |
| `name` | `string` | Yes |  |

### `games.cavu.tier-madness.defs#tier`

**Type**: `string`

**Known Values**:
- `S`
- `A`
- `B`
- `C`
- `D`
- `F`

### `games.cavu.tier-madness.defs#viewer`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No |  |
| `role` | `string` | Yes |  |

### `games.cavu.tier-madness.defs#vote`

**Type**: `object`

Where one player put the item being revealed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `tier` | `ref` → `#tier` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "award": {
      "description": "An end-of-game superlative and the bonus points it paid.",
      "properties": {
        "blurb": {
          "maxLength": 300,
          "type": "string"
        },
        "id": {
          "maxLength": 64,
          "type": "string"
        },
        "points": {
          "description": "Points to each winner.",
          "minimum": 0,
          "type": "integer"
        },
        "title": {
          "maxLength": 100,
          "type": "string"
        },
        "winners": {
          "description": "Everyone tied for it.",
          "items": {
            "format": "did",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "title",
        "blurb",
        "winners",
        "points"
      ],
      "type": "object"
    },
    "cardPoints": {
      "description": "Points one card scored for the viewer against the other players.",
      "properties": {
        "item": {
          "maxLength": 300,
          "type": "string"
        },
        "points": {
          "type": "integer"
        }
      },
      "required": [
        "item",
        "points"
      ],
      "type": "object"
    },
    "cardResult": {
      "description": "How one card scored for the viewer.",
      "properties": {
        "doubled": {
          "type": "boolean"
        },
        "fromPlayers": {
          "description": "The part of `points` scored against the other players, already counted during the reveal.",
          "type": "integer"
        },
        "group": {
          "ref": "#tier",
          "type": "ref"
        },
        "item": {
          "maxLength": 300,
          "type": "string"
        },
        "points": {
          "type": "integer"
        },
        "yours": {
          "ref": "#tier",
          "type": "ref"
        }
      },
      "required": [
        "item",
        "yours",
        "group",
        "points",
        "fromPlayers"
      ],
      "type": "object"
    },
    "gamePlayer": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "initials": {
          "maxLength": 3,
          "minLength": 3,
          "type": "string"
        }
      },
      "required": [
        "did",
        "initials"
      ],
      "type": "object"
    },
    "gameView": {
      "description": "The game as one viewer may see it. Secrets (other players' moves, items not yet dealt to this viewer) are left out until revealed.",
      "properties": {
        "awards": {
          "description": "The end-of-game superlatives (bonus phase on): who won each, and the points it paid them.",
          "items": {
            "ref": "#award",
            "type": "ref"
          },
          "type": "array"
        },
        "ballot": {
          "description": "Categories to vote on (vote phase).",
          "items": {
            "maxLength": 300,
            "type": "string"
          },
          "type": "array"
        },
        "category": {
          "maxLength": 300,
          "type": "string"
        },
        "code": {
          "description": "The join code, for players and spectators (who already know it).",
          "maxLength": 4,
          "minLength": 4,
          "type": "string"
        },
        "criteria": {
          "maxLength": 300,
          "type": "string"
        },
        "criteriaOptions": {
          "items": {
            "maxLength": 300,
            "type": "string"
          },
          "type": "array"
        },
        "criteriaPicker": {
          "format": "did",
          "type": "string"
        },
        "deadline": {
          "description": "When the server stops waiting on stalled players (ms since epoch), if it's counting down.",
          "type": "integer"
        },
        "game": {
          "maxLength": 64,
          "type": "string"
        },
        "group": {
          "description": "The group's median list (final phase).",
          "items": {
            "ref": "#placement",
            "type": "ref"
          },
          "type": "array"
        },
        "hand": {
          "description": "Cards this viewer may see: during the deal, a player's cards so far (the next is dealt once the previous placement is committed); from the reveal on, the whole round, for everyone.",
          "items": {
            "ref": "#item",
            "type": "ref"
          },
          "type": "array"
        },
        "host": {
          "format": "did",
          "type": "string"
        },
        "joinable": {
          "description": "Whether the lobby still takes players.",
          "type": "boolean"
        },
        "mine": {
          "ref": "#mine",
          "type": "ref"
        },
        "phase": {
          "ref": "#phase",
          "type": "ref"
        },
        "players": {
          "items": {
            "ref": "#player",
            "type": "ref"
          },
          "type": "array"
        },
        "rematch": {
          "description": "Game over: the rematch someone started, while it still takes players.",
          "ref": "#rematch",
          "type": "ref"
        },
        "results": {
          "description": "After the reveal: how each of the viewer's cards scored.",
          "items": {
            "ref": "#cardResult",
            "type": "ref"
          },
          "type": "array"
        },
        "reveal": {
          "ref": "#reveal",
          "type": "ref"
        },
        "revealIndex": {
          "description": "Reveal phase: which card (in deal order) is being revealed.",
          "minimum": 0,
          "type": "integer"
        },
        "revealPoints": {
          "description": "Reveal phase: the viewer's points against the other players, for each card revealed so far.",
          "items": {
            "ref": "#cardPoints",
            "type": "ref"
          },
          "type": "array"
        },
        "reveals": {
          "description": "Spectators, once a round is revealed: every item's picks at once, so a spectator screen can play the reveal on timers instead of following the host.",
          "items": {
            "ref": "#reveal",
            "type": "ref"
          },
          "type": "array"
        },
        "round": {
          "minimum": 0,
          "type": "integer"
        },
        "totalRounds": {
          "minimum": 1,
          "type": "integer"
        },
        "viewer": {
          "ref": "#viewer",
          "type": "ref"
        }
      },
      "required": [
        "game",
        "phase",
        "round",
        "totalRounds",
        "players",
        "viewer"
      ],
      "type": "object"
    },
    "item": {
      "description": "A card, sourced from a Wikipedia article.",
      "properties": {
        "extract": {
          "maxLength": 10000,
          "type": "string"
        },
        "id": {
          "maxLength": 300,
          "type": "string"
        },
        "imageUrl": {
          "format": "uri",
          "type": "string"
        },
        "name": {
          "maxLength": 300,
          "type": "string"
        },
        "sourceUrl": {
          "format": "uri",
          "type": "string"
        },
        "summary": {
          "maxLength": 1000,
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "summary"
      ],
      "type": "object"
    },
    "mine": {
      "description": "The viewer's own round so far (only ever sent to that player).",
      "properties": {
        "double": {
          "maxLength": 300,
          "type": "string"
        },
        "doubleChosen": {
          "type": "boolean"
        },
        "placements": {
          "description": "As placed, before any swap.",
          "items": {
            "ref": "#placement",
            "type": "ref"
          },
          "type": "array"
        },
        "swap": {
          "description": "The swap, once chosen ([] = skipped).",
          "items": {
            "maxLength": 300,
            "type": "string"
          },
          "maxLength": 2,
          "type": "array"
        },
        "swapChosen": {
          "type": "boolean"
        }
      },
      "required": [
        "placements"
      ],
      "type": "object"
    },
    "phase": {
      "knownValues": [
        "lobby",
        "vote",
        "pickCriteria",
        "deal",
        "swap",
        "double",
        "waiting",
        "reveal",
        "final",
        "scores",
        "bonus",
        "gameover"
      ],
      "type": "string"
    },
    "placement": {
      "properties": {
        "item": {
          "maxLength": 300,
          "type": "string"
        },
        "tier": {
          "ref": "#tier",
          "type": "ref"
        }
      },
      "required": [
        "item",
        "tier"
      ],
      "type": "object"
    },
    "player": {
      "properties": {
        "bot": {
          "description": "Played by the server (a Jev bot), not a person.",
          "type": "boolean"
        },
        "connected": {
          "type": "boolean"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "forfeit": {
          "description": "This round's moves didn't verify, so they don't count.",
          "type": "boolean"
        },
        "host": {
          "type": "boolean"
        },
        "initials": {
          "maxLength": 3,
          "type": "string"
        },
        "progress": {
          "description": "Moves committed this phase, for 'waiting on…' indicators.",
          "minimum": 0,
          "type": "integer"
        },
        "roundPoints": {
          "description": "Points from the last scored round (may be negative).",
          "type": "integer"
        },
        "score": {
          "minimum": 0,
          "type": "integer"
        },
        "scoreAfter": {
          "description": "While a round or the end-of-game bonus is being revealed: this player's total once it's banked, so a spectator screen can play it out on its own clock.",
          "type": "integer"
        }
      },
      "required": [
        "did",
        "initials",
        "score",
        "progress"
      ],
      "type": "object"
    },
    "prompt": {
      "description": "What a rating answers, embedded rather than written as a garden.lexicon.dazzling-boarfish.rating.prompt record. Its scale is the game's.",
      "properties": {
        "langs": {
          "items": {
            "format": "language",
            "type": "string"
          },
          "maxLength": 3,
          "type": "array"
        },
        "text": {
          "maxLength": 1024,
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    },
    "rematch": {
      "description": "A rematch lobby for the same table.",
      "properties": {
        "code": {
          "maxLength": 4,
          "minLength": 4,
          "type": "string"
        },
        "host": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "code",
        "host"
      ],
      "type": "object"
    },
    "reveal": {
      "properties": {
        "item": {
          "ref": "#item",
          "type": "ref"
        },
        "votes": {
          "items": {
            "ref": "#vote",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "item",
        "votes"
      ],
      "type": "object"
    },
    "scale": {
      "description": "A rating scale, embedded rather than written as a garden.lexicon.dazzling-boarfish.rating.scale record: the same fields, minus record bookkeeping.",
      "properties": {
        "code": {
          "refs": [
            "garden.lexicon.dazzling-boarfish.rating.scale#nominal",
            "garden.lexicon.dazzling-boarfish.rating.scale#ordinal",
            "garden.lexicon.dazzling-boarfish.rating.scale#interval",
            "garden.lexicon.dazzling-boarfish.rating.scale#ratio"
          ],
          "type": "union"
        },
        "description": {
          "maxLength": 1024,
          "type": "string"
        },
        "langs": {
          "items": {
            "format": "language",
            "type": "string"
          },
          "maxLength": 3,
          "type": "array"
        },
        "name": {
          "maxLength": 256,
          "type": "string"
        }
      },
      "required": [
        "name",
        "code"
      ],
      "type": "object"
    },
    "tier": {
      "knownValues": [
        "S",
        "A",
        "B",
        "C",
        "D",
        "F"
      ],
      "type": "string"
    },
    "viewer": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "role": {
          "knownValues": [
            "host",
            "player",
            "spectator"
          ],
          "type": "string"
        }
      },
      "required": [
        "role"
      ],
      "type": "object"
    },
    "vote": {
      "description": "Where one player put the item being revealed.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "tier": {
          "ref": "#tier",
          "type": "ref"
        }
      },
      "required": [
        "did",
        "tier"
      ],
      "type": "object"
    }
  },
  "id": "games.cavu.tier-madness.defs",
  "lexicon": 1
}
```
