本文へ移動

Hitotsu一つ

色か数字をそろえて出し、手札が1枚になったら声をかけます。クラシックやパーティーのルールで、コンピューターや共有のテーブルで遊べます。

「ヒトツ」は「一つ」。手札が1枚になったときに言う言葉です。 名前について(英語)

目次

リファレンス · ゲームとテーブル

HitotsuGame型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A GAME OF HITOTSU: its table and moves (what is kept), and the hand they have reached. size is the score that wins — 200 or 500 — or 1 for a game of a single hand.

インポート

import type { HitotsuGame } from "@johnmorrisdotca/hitotsu";

定義

type HitotsuGame = {
    size: number;
    players: readonly string[];
    computers: readonly boolean[];
    seed: number;
    options: HitotsuOptions;
    moves: readonly HitotsuMove[];
    hand: number;
    phase: "playing" | "over";
    hands: HitotsuCard[][];
    stock: HitotsuCard[];
    discard: HitotsuCard[];
    colour: HitotsuColour;
    direction: 1 | -1;
    toPlay: number | null;
    drawn: HitotsuCard | null;
    pending: number;
    pendingFace: "D" | "F" | null;
    challenge: HitotsuChallenge | null;
    passes: number;
    turnovers: number;
    scores: number[];
    results: HitotsuResult[];
    news: HitotsuNews[];
};

メンバー

名前型説明
sizenumber
playersreadonly string[]
computersreadonly boolean[]
seednumber
optionsHitotsuOptions
movesreadonly HitotsuMove[]
handnumber

Which hand this is, from 0: it decides who plays first.

phase"playing" | "over"
handsstring[][]
stockstring[]

Face down, top card first.

discardstring[]

Face up, top card last.

colourHitotsuColour

The colour to follow: the top card's, or the one a wild called.

direction1 | -1

1 round the table to the left, -1 after a reverse.

toPlaynumber | null
drawnstring | null

The card the player to move has just drawn, the only one they may now play; null before they draw.

pendingnumber

Cards the player to move must take unless they stack a draw card on them.

pendingFace"D" | "F" | null

The last draw card stacked, for "same card" stacking: D or F.

challengeHitotsuChallenge | null
passesnumber

Turns passed in a row with nothing to play or draw: when every player has, the hand is blocked.

turnoversnumber

How many times the discards have been shuffled into a new stock this hand.

scoresnumber[]
resultsHitotsuResult[]
newsHitotsuNews[]

What the last move did, beyond the card itself.

例

import type { HitotsuGame } from "@johnmorrisdotca/hitotsu";
import { startHitotsu } from "@johnmorrisdotca/hitotsu";

const value: HitotsuGame = startHitotsu(1, ["Aki", "Ben"], 42)!;
console.log(value.hands.map((hand) => hand.length));
[ 7, 7 ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hitotsu 1.4.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。