TaskState beta
Interface of @v12-engine/engine/ai
ts
export interface TaskState<D extends object = TaskData, M extends object = TaskMemory>What a squad is doing, as plain data kept in the brain's memory: the kind of task, what it was given, where it is in it (phase: going, regrouping, fighting, gathering, holding, the task's own words), since when, the last order it sent, and how it ended
Members
data
ts
data: D & TaskCommon;What it was given: a point (at), a target, a radius, what to do next (then). Plain data, of the task's shape
done
ts
done?: TaskDone;How it ended: none while it goes on
doneAt
ts
doneAt?: number;The tick it ended at
kind
ts
kind: string;The kind of task: the kit's (attack) or a game's (defineTask)
memory
ts
memory: M;What the task remembers of its own, plain data of the task's shape: the point of a scout's round it is at
phase
ts
phase: string;Where it is in it, in a word
phaseSince
ts
phaseSince: number;The tick its phase began at
sent
ts
sent?: number;The tick it last sent an order
since
ts
since: number;The tick it began at