Skip to content

ScoreSettings beta ​

Interface of @v12-engine/engine

ts
export interface ScoreSettings

What a game counts of its players (RuleSettings.score): the stats, how often the timeline is sampled, and who is told what while the game goes on and after it ended. presetScore() makes one of the engine's stats

Members ​

categories ​

ts
categories?: readonly {
        id: string;
        label: string;
    }[];

The tabs of the score screen, in order, with their names: those of the stats, in the order met, when left out

counts ​

ts
counts?(world: World, player: PlayerId): boolean;

Whose numbers are kept: every player but the neutral ones and the creeps when left out

end ​

ts
end?: ScoreAudience;

Who is told them once the game is decided: everyone when left out

every ​

ts
every?: number;

Seconds between two points of the timeline: 10 when left out, 0 for no timeline

live ​

ts
live?: ScoreAudience;

Who is told a player's numbers while the game goes on: their side (allies) when left out. An observer is told everyone's

maxPoints ​

ts
maxPoints?: number;

Points the timeline keeps at most: past it, every other point goes and they are twice as far apart, so a long game keeps its whole story in as much room. 360 when left out

refresh ​

ts
refresh?: number;

Seconds between two tellings of the numbers to the screens while the game goes on: 1 when left out

stats ​

ts
stats: readonly ScoreStatDef[] | ((game: Rules) => readonly ScoreStatDef[]);

The stats, or what makes them of the game (the engine's set makes one of each resource)