A live table with no reader seat: nine bots play, every card is up, and the reader watches. The config sits in the page itself, so there is no second file.
Nine bots at a 50/100 table.
file:// page.Put this line in the page once. Every table on the page shares it.
<script type="module" src="https://cdn.jsdelivr.net/npm/@imperialbower/bowery@0.3.0/bowery.js"></script>
To host it yourself, unpack bowery-vX.Y.Z.tar.gz from a
release into a
folder, for example bowery/, and load
bowery/bowery.js instead. The element loads its wasm from the
same folder.
This is the whole table. The YAML goes in a
<script type="application/yaml"> inside the element.
<bowery-table>
<script type="application/yaml">
mode: play
layout: ledger
view: all
table: { seats: 9, stakes: { small_blind: 50.0, big_blind: 100.0 } }
players:
- { seat: 0, stack: 10000, bot: gto }
- { seat: 1, stack: 10000, bot: tight_passive }
- { seat: 2, stack: 10000, bot: loose_aggressive }
- { seat: 3, stack: 10000, bot: tight_aggressive }
- { seat: 4, stack: 10000, bot: loose_passive }
- { seat: 5, stack: 10000, bot: maniac }
- { seat: 6, stack: 10000, bot: abc }
- { seat: 7, stack: 10000, bot: short_stack_ninja }
- { seat: 8, stack: 10000, bot: gto }
seed: 9
delay_ms: 400
</script>
<p>Nine bots at a 50/100 table.</p>
</bowery-table>bot, so no seat is the reader's.view: all puts every hole card face up.layout: ledger draws one row per seat. It suits many
seats and narrow screens.seed: 9 deals the same hands each time the page
loads.<p> is the fallback. The reader sees it until
the table is ready, and keeps it if JavaScript is off.Many tables can sit on one page. Each has its own config and its own game; they share one wasm module.
python3 -m http.server 8000
% shows every live seat's win percent, and with two seats left and one card to come, the trailing seat's outs; it is only there when every card is up. Play mode starts with odds off: the bots run on a timer, and a nine-way preflop step is a second of Monte Carlo in the browser. The reader turns them on with %, which is there because this config says view: all. The preflop percent is sampled, so it may differ from the figure bowery-still --odds prints.
| Field | Values | What it does |
|---|---|---|
mode | play | A live table. Needed. |
table.seats | 2 to 10 | Chairs at the table. |
table.stakes | small_blind, big_blind, ante | Whole chips. |
players | { seat, name, stack, bot } | Who sits where. Give each a bot to watch only. |
view | all, seat | Every card up, or one seat's. |
layout | ring, spotlight, ledger | How the table is drawn. |
controls.odds | true, false | Show the % button. Default: shown when the view is all. |
seed | a number | The same hands on every load. |
delay_ms | a number | Milliseconds between bot moves. Default 700. |
Every field: Config on docs.rs.
The bots are listed on the play guide.
Each finished hand sends bowery:hand-over:
document.addEventListener('bowery:hand-over', (event) => {
console.log(event.target.id, 'hand over', event.detail.result);
});This page's events: