serveWorld
Function of @v12-engine/engine
ts
export declare function serveWorld(first: Rules, options?: ServeWorldOptions): void;What a game's worker file does: serveWorld(game, { onStart }). It waits for the page to say what to play (a map, a save, or nothing for a world made here in code), makes the world, runs it by the clock, and seats the page's player at it. A new game asked for ends the one before: a restart is the same worker, its navigation built already