Decisions beta
Class of @v12-engine/engine/ai
ts
export declare class DecisionsThe last fifty things a computer player decided (Brain.decisions, written by ai.decide), oldest first: kept in a save, plain data
Members
constructor
ts
constructor(limit?: number);Constructs a new instance of the Decisions class
add
ts
add(decision: AiDecision): void;Writes one down: the oldest goes once there are more than the log keeps
last
ts
last(about: {
goal?: string;
kind?: string;
}): AiDecision | undefined;The last decision about a goal, or of a kind
list
ts
list(): readonly AiDecision[];What it decided, oldest first
restore
ts
restore(lines: unknown): void;Takes back what save gave: what is not a decision is passed over
save
ts
save(): AiDecision[];For a save: a copy