# games.cavu.haikuDay

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

✓ This is the authoritative definition for this NSID.

## Description

Haiku Day's types: scoreDetails ($type of a games.cavu.score record's details for game haiku-day) and the intents and views it exchanges over games.cavu.subscribeSession.

## Links

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

## Definitions

### `games.cavu.haikuDay#gradedLine`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tiles` | `array` | Yes |  |

### `games.cavu.haikuDay#gradedTile`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `correct` | `boolean` | Yes |  |
| `id` | `string` | Yes |  |

### `games.cavu.haikuDay#intent`

**Type**: `union`

```json
{
  "refs": [
    "#place",
    "#submit"
  ],
  "type": "union"
}
```

### `games.cavu.haikuDay#place`

**Type**: `object`

Move a tile. 0 = the bank, 1-3 = poem lines. The missing word ('missing') may be placed once per line.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `from` | `integer` | Yes |  |
| `index` | `integer` | No | 1-based insert position in the target line after removal from the source; default end. |
| `item` | `string` | Yes |  |
| `to` | `integer` | Yes |  |
| `type` | `string` | Yes |  |

### `games.cavu.haikuDay#result`

**Type**: `object`

Present only after this viewer submits. Reveals the solution.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `decoy` | `string` | Yes |  |
| `lines` | `array` | Yes |  |
| `max_score` | `integer` | Yes |  |
| `missing` | `ref` → `#word` | Yes |  |
| `score` | `integer` | Yes |  |
| `solution` | `array` | Yes |  |

### `games.cavu.haikuDay#scoreDetails`

**Type**: `object`

games.cavu.score `details` for Haiku Day: the puzzle number and which tiles were right, per line.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lines` | `array` | Yes |  |
| `number` | `integer` | Yes |  |

### `games.cavu.haikuDay#scoreLine`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `correct` | `array` | Yes |  |

### `games.cavu.haikuDay#solutionLine`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `words` | `array` | Yes |  |

### `games.cavu.haikuDay#submit`

**Type**: `object`

Grade the current lines. One try per day.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |

### `games.cavu.haikuDay#tile`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes |  |
| `syllables` | `integer` | Yes |  |
| `text` | `string` | Yes |  |

### `games.cavu.haikuDay#view`

**Type**: `object`

project(state, viewer). `none` when no puzzle is scheduled for the day.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `date` | `string` | Yes |  |
| `lines` | `array` | No |  |
| `max_score` | `integer` | No |  |
| `missing_id` | `string` | No |  |
| `next_at` | `integer` | No | Next puzzle, ms since epoch (UTC midnight). |
| `none` | `boolean` | No |  |
| `number` | `integer` | No |  |
| `result` | `ref` → `#result` | No |  |
| `tiles` | `array` | No |  |

### `games.cavu.haikuDay#word`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `syllables` | `integer` | Yes |  |
| `text` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "gradedLine": {
      "properties": {
        "tiles": {
          "items": {
            "ref": "#gradedTile",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "tiles"
      ],
      "type": "object"
    },
    "gradedTile": {
      "properties": {
        "correct": {
          "type": "boolean"
        },
        "id": {
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "id",
        "correct"
      ],
      "type": "object"
    },
    "intent": {
      "refs": [
        "#place",
        "#submit"
      ],
      "type": "union"
    },
    "place": {
      "description": "Move a tile. 0 = the bank, 1-3 = poem lines. The missing word ('missing') may be placed once per line.",
      "properties": {
        "from": {
          "maximum": 3,
          "minimum": 0,
          "type": "integer"
        },
        "index": {
          "description": "1-based insert position in the target line after removal from the source; default end.",
          "minimum": 1,
          "type": "integer"
        },
        "item": {
          "maxLength": 32,
          "type": "string"
        },
        "to": {
          "maximum": 3,
          "minimum": 0,
          "type": "integer"
        },
        "type": {
          "const": "place",
          "type": "string"
        }
      },
      "required": [
        "type",
        "item",
        "from",
        "to"
      ],
      "type": "object"
    },
    "result": {
      "description": "Present only after this viewer submits. Reveals the solution.",
      "properties": {
        "decoy": {
          "maxLength": 64,
          "type": "string"
        },
        "lines": {
          "items": {
            "ref": "#gradedLine",
            "type": "ref"
          },
          "type": "array"
        },
        "max_score": {
          "minimum": 0,
          "type": "integer"
        },
        "missing": {
          "ref": "#word",
          "type": "ref"
        },
        "score": {
          "minimum": 0,
          "type": "integer"
        },
        "solution": {
          "items": {
            "ref": "#solutionLine",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "score",
        "max_score",
        "lines",
        "missing",
        "solution",
        "decoy"
      ],
      "type": "object"
    },
    "scoreDetails": {
      "description": "games.cavu.score `details` for Haiku Day: the puzzle number and which tiles were right, per line.",
      "properties": {
        "lines": {
          "items": {
            "ref": "#scoreLine",
            "type": "ref"
          },
          "maxLength": 3,
          "minLength": 3,
          "type": "array"
        },
        "number": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "number",
        "lines"
      ],
      "type": "object"
    },
    "scoreLine": {
      "properties": {
        "correct": {
          "items": {
            "type": "boolean"
          },
          "maxLength": 32,
          "type": "array"
        }
      },
      "required": [
        "correct"
      ],
      "type": "object"
    },
    "solutionLine": {
      "properties": {
        "words": {
          "items": {
            "ref": "#word",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "words"
      ],
      "type": "object"
    },
    "submit": {
      "description": "Grade the current lines. One try per day.",
      "properties": {
        "type": {
          "const": "submit",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "tile": {
      "properties": {
        "id": {
          "maxLength": 32,
          "type": "string"
        },
        "syllables": {
          "minimum": 1,
          "type": "integer"
        },
        "text": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "id",
        "text",
        "syllables"
      ],
      "type": "object"
    },
    "view": {
      "description": "project(state, viewer). `none` when no puzzle is scheduled for the day.",
      "properties": {
        "date": {
          "maxLength": 10,
          "type": "string"
        },
        "lines": {
          "items": {
            "items": {
              "maxLength": 32,
              "type": "string"
            },
            "type": "array"
          },
          "maxLength": 3,
          "minLength": 3,
          "type": "array"
        },
        "max_score": {
          "minimum": 0,
          "type": "integer"
        },
        "missing_id": {
          "maxLength": 32,
          "type": "string"
        },
        "next_at": {
          "description": "Next puzzle, ms since epoch (UTC midnight).",
          "type": "integer"
        },
        "none": {
          "type": "boolean"
        },
        "number": {
          "minimum": 1,
          "type": "integer"
        },
        "result": {
          "ref": "#result",
          "type": "ref"
        },
        "tiles": {
          "items": {
            "ref": "#tile",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "date"
      ],
      "type": "object"
    },
    "word": {
      "properties": {
        "syllables": {
          "minimum": 1,
          "type": "integer"
        },
        "text": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "text",
        "syllables"
      ],
      "type": "object"
    }
  },
  "description": "Haiku Day's types: scoreDetails ($type of a games.cavu.score record's details for game haiku-day) and the intents and views it exchanges over games.cavu.subscribeSession.",
  "id": "games.cavu.haikuDay",
  "lexicon": 1
}
```
