awaseRules関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The rules a game is played by. A challenge sets its own; the options given are laid over what it allows, and where a
challenge takes something away (undo in the spark and blackout) it stays taken away. tiles is how many tiles the
layout holds, which the clocks and goals are scaled by.
インポート
import { awaseRules } from "@johnmorrisdotca/jarajara/awase";
定義
function awaseRules(tiles: number, options?: AwaseOptions): AwaseRules
引数
| 名前 | 型 | 説明 |
|---|---|---|
tiles | number | The number of tiles in the starting layout. |
options (省略可) | AwaseOptions | Native game, SVG, sound or presentation options. |
戻り値
AwaseRules
The rules a game is played by. A challenge sets its own; the options given are laid over what it allows, and where a challenge takes something away (undo in the spark and blackout) it stays taken away. tiles is how many tiles the layout holds, which the clocks and goals are scaled by.
例
import { awaseRules, generateAwase } from "@johnmorrisdotca/jarajara/awase";
const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(awaseRules(cells.length,{challenge:"rush"}));{
challenge: 'rush',
hints: null,
shuffles: null,
undo: true,
timeMs: 180000,
reserveMs: null,
pairBonusMs: 0,
sparkBonusMs: 0,
comboBonusMs: 0,
goalPairs: 2,
goalScore: null,
hideBlocked: false
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。