ComputerAction型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the computer does next in a game, for the side it plays.
インポート
import type { ComputerAction } from "@johnmorrisdotca/sugoroku";
定義
type ComputerAction = {
kind: "throw";
} | {
kind: "double";
} | {
kind: "roll";
} | {
kind: "play";
play: Play;
} | {
kind: "end";
} | {
kind: "take";
} | {
kind: "drop";
};
例
import type { ComputerAction } from "@johnmorrisdotca/sugoroku";
const value: ComputerAction = {kind:"roll"};
console.log(value);{ kind: 'roll' }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。