# games.atplay.game.turn

> Published by [atplay.games](https://lexicon.garden/identity/did:plc:xawtkr77srkxlwhxjf7whbml)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xawtkr77srkxlwhxjf7whbml/games.atplay.game.turn)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xawtkr77srkxlwhxjf7whbml/games.atplay.game.turn/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xawtkr77srkxlwhxjf7whbml/games.atplay.game.turn/examples)

## Definitions

### `games.atplay.game.turn`

**Type**: `record`

A turn

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `game` | `ref` → `games.atplay.game.release` | Yes |  |
| `state` | `ref` → `games.atplay.game.state` | Yes |  |
| `actions` | `array` | Yes | The actions taken by this player in this game, created & interpretable by the game logic (but ideally also human readable) |
| `follows` | `array` | No | The record(s) that this new game state is based upon. This is usually the single previous turn (or the invitation, for the first turn), but for games where turns can be taken parallel for a given round, this may contain more than one record. |
| `invitation` | `ref` → `com.atproto.repo.strongRef` | Yes | Reference to the game invitation record |
| `nextPlayers` | `array` | No | Array of DIDs for the next player(s) to take a turn |

## Raw Schema

```json
{
  "id": "games.atplay.game.turn",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "game",
          "invitation",
          "actions",
          "state"
        ],
        "properties": {
          "game": {
            "ref": "games.atplay.game.release",
            "type": "ref"
          },
          "state": {
            "ref": "games.atplay.game.state",
            "type": "ref"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 1024
            },
            "minLength": 1,
            "description": "The actions taken by this player in this game, created & interpretable by the game logic (but ideally also human readable)"
          },
          "follows": {
            "type": "array",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "minLength": 1,
            "description": "The record(s) that this new game state is based upon. This is usually the single previous turn (or the invitation, for the first turn), but for games where turns can be taken parallel for a given round, this may contain more than one record."
          },
          "invitation": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "Reference to the game invitation record"
          },
          "nextPlayers": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "did"
            },
            "minLength": 1,
            "description": "Array of DIDs for the next player(s) to take a turn"
          }
        }
      },
      "description": "A turn"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
