Reference · Rules, games and records
ComputerActiontype
What the computer does next in a game, for the side it plays.
Import it
import type { ComputerAction } from "@johnmorrisdotca/sugoroku";
Definition
type ComputerAction = {
kind: "throw";
} | {
kind: "double";
} | {
kind: "roll";
} | {
kind: "play";
play: Play;
} | {
kind: "end";
} | {
kind: "take";
} | {
kind: "drop";
};
Examples
import type { ComputerAction } from "@johnmorrisdotca/sugoroku";
const value: ComputerAction = {kind:"roll"};
console.log(value);{ kind: 'roll' }What it prints (run when this page was built)