Jarajara ドキュメント
Jarajara ジャラジャラ — Mahjong tiles and mahjong solitaire
麻雀牌を描き、手牌や積み重ねた盤を配置し、シード付きの「合わせ」をひとりでも対戦卓でも遊べます。
インストール
npm install @johnmorrisdotca/jarajara
最初に読む
エントリーポイント
| インポート | 概要 | サイズ |
|---|---|---|
@johnmorrisdotca/合わせのひとり遊び · エクスポート 33個 | Awase (合わせ, "matching"): the matching solitaire. | 7.7 kB |
@johnmorrisdotca/合わせの対戦卓 · エクスポート 19個 | Awase at a table, for two to four: one layout, turns taken, each pair scoring (the plain suits one, ones and nines two, a wind three, a dragon four, a flower or season two and another turn), most points wins. | 4.7 kB |
@johnmorrisdotca/SVGの図柄と見た目 · エクスポート 52個 | The tiles, drawn: each of the 42 faces as SVG text, a tile on its own, its back, and a whole layout of stacked tiles, on a cloth if you like. | 41.9 kB |
@johnmorrisdotca/牌と卓の要素 · エクスポート 25個 | Jarajara's custom elements, as classes, with nothing defined: import this to extend them or to define them under other names. | 97.7 kB |
@johnmorrisdotca/要素の登録 · エクスポート 0個 | Defines Jarajara's custom elements on the page: <jarajara-tile>, <jarajara-rack>, <jarajara-layout>, <jarajara-table>, <jarajara-group>, <jarajara-set> and <jarajara-viewer>. | 97.4 kB |
@johnmorrisdotca/リーチの図柄 · エクスポート 1個 | The regular riichi design: FluffyStuff's riichi mahjong tiles (public domain, CC0; see CREDITS.md), the 34 faces of a riichi set with the tile's own plate and back and the red fives. | 16.6 kB |
@johnmorrisdotca/黒いリーチの図柄 · エクスポート 1個 | The black riichi design: FluffyStuff's riichi mahjong tiles (public domain, CC0; see CREDITS.md), the 34 faces of a riichi set with the tile's own plate and back and the red fives. | 16.5 kB |
@johnmorrisdotca/音の操作 · エクスポート 10個 | The sounds of a mahjong table: a tile picked up, set down or turned over, a pair knocked together, the tiles shuffled, a clatter for a win. | 26.7 kB |
@johnmorrisdotca/収録された音 · エクスポート 2個 | 24.4 kB | |
@johnmorrisdotca/牌・配置・配り方 · エクスポート 93個 | Jarajara: mahjong tiles for JavaScript and TypeScript. | 7.9 kB |
ガイド
やり方
- 名前・表記・手牌牌のコードと表記を区別し、牌を変えずに手牌を並べ、手牌の要素を使います。
- SVGと図柄を選ぶ牌と配置をSVGの文字列または要素で描き、必要な図柄だけを読み込み、SVGの識別子を分けます。
- ひとり遊びと挑戦自由で一致する組を取り、挑戦では時刻を自分で渡し、ヒントと拒否の扱いを保ちます。
- 対戦卓で遊ぶ2〜4人で1つの卓を使い、組の得点を数え、記録から卓を復元します。
- 手牌・要素・音の埋め込み牌の要素をブラウザーに登録し、手牌を埋め込み、任意の音を加えます。
解説
困ったとき・よくある質問
アップグレード
- 変更履歴@johnmorrisdotca/jarajara 1.7.0 のソースから作成しました。
- すべてのエクスポートを1ページでapi.html
- 言語モデル向けのドキュメントllms.txt · llms-full.txt
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。