Skip to content

spend beta ​

Function of @v12-engine/engine

ts
export declare function spend(world: World, player: PlayerId, cost: Cost | undefined, on: SpentOn, id?: string): void;

Has a player pay a cost, and says so (resourcesSpent, what the score counts as spent): on what, and its id. For a game's own purchases too, so that they count as the engine's do. The purse is not checked: shortOf first