Entity
The non-player things. Chess has one type: the piece. The
instance update spawns the 32 of them when the game starts, and the
move command is what relocates, captures and flags them. A
piece therefore carries only a schema: its state is edited entirely
by that command, so it needs no update files of its own.
piece
One chessman. Its fields, all public (visibility public, so
they stream to both clients), are the kind (pawn, knight, and so on), the color
(white or black), the 0-based file and rank that place it on the board — each
bounded 0–7 by min/max range hints — and a
moved flag the move command reads to allow a pawn's double step and castling.
[
{
"gamehoster-entity-schema-name": "kind",
"gamehoster-entity-schema-type": "string",
"gamehoster-entity-schema-visibility": "public"
},
{
"gamehoster-entity-schema-name": "color",
"gamehoster-entity-schema-type": "string",
"gamehoster-entity-schema-visibility": "public"
},
{
"gamehoster-entity-schema-name": "file",
"gamehoster-entity-schema-type": "int",
"gamehoster-entity-schema-default": 0,
"gamehoster-entity-schema-visibility": "public",
"gamehoster-entity-schema-min": 0,
"gamehoster-entity-schema-max": 7
},
{
"gamehoster-entity-schema-name": "rank",
"gamehoster-entity-schema-type": "int",
"gamehoster-entity-schema-default": 0,
"gamehoster-entity-schema-visibility": "public",
"gamehoster-entity-schema-min": 0,
"gamehoster-entity-schema-max": 7
},
{
"gamehoster-entity-schema-name": "moved",
"gamehoster-entity-schema-type": "bool",
"gamehoster-entity-schema-default": false,
"gamehoster-entity-schema-visibility": "public"
}
]