# ai.dennery.game.jigsaw

- Kind: defs
- Authority: game.dennery.ai
- Lexicon: 1
- Published by [game.dennery.ai](https://lexicon.garden/identity/did:plc:com7beprxcim4u4ezzroudpc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:com7beprxcim4u4ezzroudpc/ai.dennery.game.jigsaw)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:com7beprxcim4u4ezzroudpc/ai.dennery.game.jigsaw/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:com7beprxcim4u4ezzroudpc/ai.dennery.game.jigsaw/analytics)

## #move (`ai.dennery.game.jigsaw#move`)

Type: object

One jigsaw placement turn: 1-7 tiles onto their squares.

### Properties

- `placements` (array, required)
  - Constraints: maxLength: 7
  - `items` (object)

## #puzzle (`ai.dennery.game.jigsaw#puzzle`)

Type: object

A jigsaw puzzle definition: grid size plus tile home squares.

### Properties

- `cols` (integer, required)
  - Constraints: minimum: 1, maximum: 13
- `rows` (integer, required)
  - Constraints: minimum: 1, maximum: 13
- `solution` (object, required): Tile id to home square.

## #state (`ai.dennery.game.jigsaw#state`)

Type: object

Authoritative jigsaw progress: placed tiles.

### Properties

- `cols` (integer, required)
  - Constraints: minimum: 1, maximum: 13
- `placed` (object, required): Tile id to square.
- `placedCount` (integer, required)
  - Constraints: minimum: 0
- `rows` (integer, required)
  - Constraints: minimum: 1, maximum: 13

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "move": {
      "description": "One jigsaw placement turn: 1-7 tiles onto their squares.",
      "properties": {
        "placements": {
          "items": {
            "properties": {
              "col": {
                "maximum": 12,
                "minimum": 0,
                "type": "integer"
              },
              "row": {
                "maximum": 12,
                "minimum": 0,
                "type": "integer"
              },
              "tile": {
                "maxLength": 64,
                "type": "string"
              }
            },
            "required": [
              "tile",
              "row",
              "col"
            ],
            "type": "object"
          },
          "maxLength": 7,
          "type": "array"
        }
      },
      "required": [
        "placements"
      ],
      "type": "object"
    },
    "puzzle": {
      "description": "A jigsaw puzzle definition: grid size plus tile home squares.",
      "properties": {
        "cols": {
          "maximum": 13,
          "minimum": 1,
          "type": "integer"
        },
        "rows": {
          "maximum": 13,
          "minimum": 1,
          "type": "integer"
        },
        "solution": {
          "description": "Tile id to home square.",
          "type": "object"
        }
      },
      "required": [
        "cols",
        "rows",
        "solution"
      ],
      "type": "object"
    },
    "state": {
      "description": "Authoritative jigsaw progress: placed tiles.",
      "properties": {
        "cols": {
          "maximum": 13,
          "minimum": 1,
          "type": "integer"
        },
        "placed": {
          "description": "Tile id to square.",
          "type": "object"
        },
        "placedCount": {
          "minimum": 0,
          "type": "integer"
        },
        "rows": {
          "maximum": 13,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "cols",
        "rows",
        "placed",
        "placedCount"
      ],
      "type": "object"
    }
  },
  "id": "ai.dennery.game.jigsaw",
  "lexicon": 1
}
```
