本文へ移動

Kumimoji組み文字

シードから配った英字やかなのタイルで、ひとりでも複数人の卓でも、単語を組み合わせて遊べます。

「組み文字」は文字を組み合わせることを表す言葉です。 名前について(英語)

目次

リファレンス · ルール・タイル・記録

TilePlay型

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

A KUMIMOJI BEING PLAYED: the bag, the tiles traded back into it, how many have been taken out, the tiles on the table and the hand. Every move is a function that returns a new state and leaves the one it was given alone, the way the engine's moves are. Nothing here knows how the table is being looked at — zoom and pan are the view's (tableView.ts), never the game's.

THE BAG IS A LINE, not a heap. Its tiles come out in the order the seed dealt them (givens), and a tile traded back joins the END of the line, so the tiles still to come are always bag + returned from taken on. That keeps a game the same for everybody at a seed, trades and all, and lets a kept game be checked: what is held — hand and table — is exactly what was taken, less what was given back.

インポート

import type { TilePlay } from "@johnmorrisdotca/kumimoji";

定義

type TilePlay = {
    bag: string;
    returned: string;
    taken: number;
    tiles: Tiles;
    hand: readonly string[];
};

メンバー

名前型説明
bagstring

The tiles in the order they come out: the puzzle's givens.

returnedstring

Tiles traded back, in order; they come out after the bag.

takennumber

How many tiles have been taken from bag + returned.

tilesTiles

The tiles on the table, by square ("row,col").

handreadonly string[]

The hand, in the order the player keeps it.

例

import { deal } from "@johnmorrisdotca/kumimoji";
import type { TilePlay } from "@johnmorrisdotca/kumimoji";

const play = deal("catdog",3);
const value: TilePlay = play;
console.log(value);
{
  bag: 'catdog',
  returned: '',
  taken: 3,
  tiles: Map(0) {},
  hand: [ 'c', 'a', 't' ]
}

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

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

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