本文へ移動

Jarajaraジャラジャラ

麻雀牌を描き、手牌や積み重ねた盤を配置し、シード付きの「合わせ」をひとりでも対戦卓でも遊べます。

「ジャラジャラ」は麻雀牌が触れ合う音を表す言葉です。 名前について(英語)

目次

リファレンス · 合わせのひとり遊び

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

引数

名前型説明
tilesnumber

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
}

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

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

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