Skip to content

GameInit ​

Interface of @v12-engine/engine

ts
export interface GameInit extends Partial<Rules>

What a game is made with (createGame): its id and name, and any field of the module underneath (Rules) said at once: a whole Rules is a game too (createGame(rules)). What is registered on the game after comes after what is given here

Members ​

checkView ​

ts
checkView?: 'warn' | 'throw' | false;

What is done, as its view is fetched in a page, about a view that names what the rules do not have (the client's checkGame): a warning for each when left out, an error with all of them ('throw'), or nothing (false)

contentPacks ​

ts
contentPacks?: readonly string[];

Packs of content to play it with in a page, by URL ('/packs/gnomes/pack.json'): fetched as a game of it is got ready, before its world is made, and composed in this order (the client's mergePacks). A server plays its own (readPacks). None when left out

id ​

ts
id: string;

The game's id, which a save, a map (GameMap.game) and a server know it by

name ​

ts
name: string;

What the player sees the game called