Skip to content

testWorld ​

Function of @v12-engine/engine/testing

ts
export declare function testWorld(game: Game<unknown> | Rules, options?: {
    terrain?: Terrain;
    size?: number;
    players?: PlayerInit[];
    seed?: number;
    log?: Logger;
}): Promise<World>;

A small world of a game for a test (the game, createGame, or its module, Rules): flat ground, a neutral player and two enemies (TEST_PLAYERS), the same every time (seed 7). Each of them is the test's to say otherwise