Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference

Playable table

import { … } from "@johnmorrisdotca/toranpu/table";

263.4 kB minified and gzipped, with everything it imports (measured with esbuild)

<toranpu-table>: any of the ten games, ready to play on a page — the seats, the felt in any of the family's cloths, the trick and the piles (the stock and the discard as <toranpu-pile>, as untidy as asked), the hand of whoever is to play and the moves they may make, with computers in every other seat.

<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/toranpu@2/dist/table-define.js"></script>
<toranpu-table game="crazy-eights" players="3" cloth="blue" messiness="0.4"></toranpu-table>

This entry carries the rules of all ten games, so it is its own: a page that wants only a card or a hand imports ./element. defineToranpuTable() registers it, and the card, hand and pile elements it lays out.

Exports

NameKindWhat it is
defineToranpuTablefunctionRegisters <toranpu-table>, and the card, hand and pile elements, once.
TABLE_CLOTHSconstantTHE CLOTHS A TABLE MAY BE LAID IN: the same five the whole family offers, and itsutsu.com's boards.
TableClothtypeA cloth's name.
ToranpuTableclass<toranpu-table>: ANY OF THE ELEVEN GAMES, READY TO PLAY.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.