RecordedMovetype
One move of a record: which seat made it, and the move.
Import it
import type { RecordedMove } from "@johnmorrisdotca/toranpu";
Definition
type RecordedMove<K extends CardGameKind = CardGameKind> = {
seat: number;
move: MoveOf<K>;
};
Members
| Name | Type | Description |
|---|---|---|
seat | number | |
move | MoveOf<K> |
Examples
import { newGame, rulesFor } from "@johnmorrisdotca/toranpu";
import type { RecordedMove } from "@johnmorrisdotca/toranpu";
const game = newGame("hearts", { players: ["Aki", "Ben", "Cy", "Dev"], seed: 42 })!;
const value: RecordedMove<"hearts"> = { seat: 0, move: rulesFor("hearts").moves(game)[0]! };
console.log(value.seat);0What it prints (run when this page was built)