本文へ移動

Jarajaraジャラジャラ

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

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

目次

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

AWASE_CHALLENGES定数

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

AWASE WITH RULES YOU CHOOSE: options a game may be given (hints, shuffles and undo given, limited or taken away) and the challenges worth playing a deal for. The ideas come from the challenge modes of good mahjong solitaires (see CREDITS.md); the code and the numbers are Jarajara's own. None of it touches a deal: a challenge is played on exactly the tiles generateAwase made, so every deal here can still be cleared, and checkAwase still judges a solve by the tiles alone.

A game is an AwaseRun: plain data, changed only by returning a new one. It has no clock of its own: every move is given at, milliseconds on any clock the caller keeps (only the differences matter), so a run is as testable as any other rule here and a server may replay one.

The challenges, each the same deal played for something else: gold take a pair of the gold face, four tiles ringed in gold: hunt it down, the stacks permitting spark clear the layout before time runs out; a pair of the spark face adds time and sends the spark on rush make the goal number of pairs before time runs out; the layout need not be cleared fortune reach the goal score before time runs out; fast pairs in a row build a multiplier sand clear the layout from a little time, every pair adding some, to a limit purge take every tile of the marked group before time runs out blackout clear the layout with only the free tiles showing their faces; no undo

インポート

import { AWASE_CHALLENGES } from "@johnmorrisdotca/jarajara/awase";

定義

const AWASE_CHALLENGES: readonly ["gold", "spark", "rush", "fortune", "sand", "purge", "blackout"] = ["gold", "spark", "rush", "fortune", "sand", "purge", "blackout"] as const

例

import { AWASE_CHALLENGES } from "@johnmorrisdotca/jarajara/awase";
console.log(AWASE_CHALLENGES);
[
  'gold',     'spark',
  'rush',     'fortune',
  'sand',     'purge',
  'blackout'
]

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

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

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