Skip to content

RandomMapSceneOptions beta ​

Interface of @v12-engine/client/app

ts
export interface RandomMapSceneOptions

What a scene of a random map is made with (randomMapScene)

Members ​

back ​

ts
back?: {
        label?: string;
        scene?: SceneRef;
    };

The button back out: what it says (Back), and the scene it goes to (the list of scenes when left out)

game ​

ts
game: LoadedGame;

The game whose rules, view and generator the random map is made and played with

generator ​

ts
generator?: MapGenerator;

The generator: the game's own (Rules.generator) when left out

generatorWorker ​

ts
generatorWorker?: () => NavigationWorkerLike;

What makes the worker the preview's maps are made in, so that the form does not stop the page while one is made: a worker whose file serves the game's generator (serveMapGenerator(rules)), made as the project's bundler wants it, () => new Worker(new URL('./generate.worker.ts', import.meta.url), { type: 'module' }). Made as the first map is asked for. This thread when left out, and where generator is given (a worker knows only the game's own)

id ​

ts
id?: string;

The scene's id: random-map when left out

initial ​

ts
initial?: Partial<GeneratorOptions>;

What the form starts at: 128 a side, two players, no symmetry, the parameters' defaults, when left out

name ​

ts
name?: string;

What the scene is called in the list of scenes

play ​

ts
play: SceneRef;

The scene of the game it plays the map in (a gameScene): handed the generator's options as SceneArgs.generated

title ​

ts
title?: string;

What is over the form: A random map when left out