File size: 3,403 Bytes
399e448
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "game_setup.schema.json",
  "x-contract-version": 1,
  "$defs": {
    "SeatModel": {
      "additionalProperties": false,
      "properties": {
        "seat": {
          "pattern": "^p[0-9]$",
          "title": "Seat",
          "type": "string"
        },
        "model": {
          "description": "A model name from models_catalog.json, or 'human'.",
          "title": "Model",
          "type": "string"
        }
      },
      "required": [
        "seat",
        "model"
      ],
      "title": "SeatModel",
      "type": "object"
    },
    "SpecialRoles": {
      "additionalProperties": false,
      "properties": {
        "seer": {
          "default": true,
          "title": "Seer",
          "type": "boolean"
        },
        "doctor": {
          "default": true,
          "title": "Doctor",
          "type": "boolean"
        }
      },
      "title": "SpecialRoles",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "One game's settings. Every default is the Basic setup.\n\nValidate with `GameSetup.model_validate(data)`; model names are checked against\nconfigs/models.yaml unless `context={\"models\": {...}}` gives another set.",
  "properties": {
    "mode": {
      "default": "basic",
      "description": "basic allows only seed and human_seat to change.",
      "enum": [
        "basic",
        "advanced"
      ],
      "title": "Mode",
      "type": "string"
    },
    "n_players": {
      "default": 10,
      "maximum": 10,
      "minimum": 7,
      "title": "N Players",
      "type": "integer"
    },
    "n_wolves": {
      "default": 2,
      "description": "Must be fewer than the villager side.",
      "minimum": 1,
      "title": "N Wolves",
      "type": "integer"
    },
    "special_roles": {
      "$ref": "#/$defs/SpecialRoles",
      "default": {
        "seer": true,
        "doctor": true
      }
    },
    "seats": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/SeatModel"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "One entry per seat p0..p{n_players-1}. Excludes model_pool.",
      "title": "Seats"
    },
    "model_pool": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Models to fill the seats from; null means the default lineup.",
      "title": "Model Pool"
    },
    "rotation": {
      "default": "shuffle",
      "description": "How model_pool fills the model seats: in_order repeats the pool from p0; shuffle first shuffles the pool with the seed.",
      "enum": [
        "in_order",
        "shuffle"
      ],
      "title": "Rotation",
      "type": "string"
    },
    "human_seat": {
      "anyOf": [
        {
          "pattern": "^p[0-9]$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The seat a person plays, or null.",
      "title": "Human Seat"
    },
    "seed": {
      "title": "Seed",
      "type": "integer"
    }
  },
  "title": "GameSetup",
  "type": "object"
}