Skip to content

ComputerWatch beta ​

Interface of @v12-engine/engine/testing

ts
export interface ComputerWatch

A computer player followed over a run (watchComputer): the rules it broke, what it decided and sent, and, where asked, what an observer saw at each of its thinks

Members ​

assert ​

ts
assert(): void;

Throws, listing them, where it broke any rule

brain ​

ts
readonly brain: Brain;

The brain watched

commands ​

ts
readonly commands: number;

Commands it sent while watched

decisions ​

ts
readonly decisions: readonly AiDecision[];

What it decided while watched, oldest first: every line, not only the last fifty its log keeps

stop ​

ts
stop(): void;

Stops watching

thinks ​

ts
readonly thinks: number;

Its thinks while watched

violations ​

ts
readonly violations: readonly AiViolation[];

Every invariant it broke, in the order found (ai/checks.ts)