1681-engine / index / InputRecorder
Class: InputRecorder<A> ​
Defined in: src/input/inputTape.ts:29
Records an Actions' every step until stopped.
ts
const rec = new InputRecorder(actions, { seed, level: 'forest-2' });
// … play …
const tape = rec.stop(); // JSON.stringify it into the bug reportType Parameters ​
| Type Parameter |
|---|
A extends string |
Constructors ​
Constructor ​
ts
new InputRecorder<A>(actions, meta?): InputRecorder<A>;Defined in: src/input/inputTape.ts:38
Parameters ​
| Parameter | Type |
|---|---|
actions | Actions<A> |
meta? | Record<string, unknown> |
Returns ​
InputRecorder<A>
Accessors ​
length ​
Get Signature ​
ts
get length(): number;Defined in: src/input/inputTape.ts:46
Steps recorded so far.
Returns ​
number
Methods ​
stop() ​
ts
stop(): InputTape;Defined in: src/input/inputTape.ts:51
Stops recording and returns the tape (the same one on every later call).