Mahjong solitaire, its rules in Hazel
Hazel activities › One-player games · source on GitHub · hazeljs on npm144 tiles stacked in layers. Take away two tiles that match, as long as each is free: nothing on top of it, and nothing beside it on its left or on its right. Two tiles match when their faces are the same; any flower matches any flower, and any season any season. Clear the table to win. Every deal can be won: Hazel makes it by playing it. Stuck? ↩️ takes a pair back, 🔀 shuffles the tiles still out (and keeps the game winnable), ❓ shows a pair Hazel would take.
This app needs JavaScript, and a page served over http (python3 -m http.server, then localhost).
The vocabulary the module sees (mahjong-solitaire/rules/preamble.hz). The listings are text, highlighted, until Edit in Hazel opens each in Hazel's own editor; an edit changes the next deal and move (interpreted, so slower: a deal takes Hazel's interpreter about 20 seconds).
loading preamble.hz…
loading MahjongSolitaire.hz…
hazeljs-examples · versions · Apache 2.0 (code), CC BY 4.0 (words, the tile art, the icon) · by Matthew Hammer · an example for hazeljs