MatchesOf型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Which tile Find would show for a slot: the ones that could be taken with it now, and the ones that match but are held.
インポート
import type { MatchesOf } from "@johnmorrisdotca/jarajara";
定義
type MatchesOf = {
free: number[];
blocked: number[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
free | number[] | The slots that match the tile and could be taken with it now: both are free. Empty when the tile itself is held. |
blocked | number[] | The other slots that match it: held by a tile on top or on both sides (or, when the tile itself is held, every match). |
例
import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { freePairs, geometryOf, layoutFor, matchesOf } from "@johnmorrisdotca/jarajara";
import type { MatchesOf } from "@johnmorrisdotca/jarajara";
const deal = generateAwase(4,"easy",2026);
const layout = layoutFor(4)!;
const geometry = geometryOf(layout);
const cells = deal.givens;
const pair = freePairs(geometry,cells,"group")[0];
const value: MatchesOf = matchesOf(geometry,cells,"group",pair[0]);
console.log(value);{ free: [ 7 ], blocked: [] }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。