Skip to content

About

Bean Bazaar: a bean-trading card game you play in the browser against bots

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Bean Bazaar

Adorable beans. Ruthless trading.

A bean-trading card game for 1 player against 2 to 4 bots, right in your browser.

A real turn: plant a bean, flip two cards, then take a gift from Pinto

No download, no sign-up. Your game saves in the browser, so a reload picks it up where you left it.

Watch the trailer

trailer-readme.mp4

Meet the beans

Blue Bean Chili Bean Stink Bean Green Bean Soy Bean
Black-eyed Bean Red Bean Wax Bean Coffee Bean Golden Bean

Ten beans, each with its own character, from the Blue Bean playing sax in the rain to the Chili Bean bundled up against the snow.

How it plays

Your turn in a game against Pinto and Lima: plant the Black-eyed bean

  • Plant the front card of your hand every turn, and the next one if you like. You can never reorder your hand.
  • Trade the two cards you flip, or cards from your hand, with the bots. Whatever you get must be planted.
  • Harvest a field for coins. Each field grows one bean type, and bigger piles pay more.
  • Win with the most coins when the deck runs out for the third time.

Press Rules in the game for a guided tour of every rule.

The bots

Four bots sit at the table, each with their own way of trading:

Bot Says no with Plays
Pinto "Sorry, friend" Generous: happy to give and take gifts
Lima "Do better" Shrewd: won't feed whoever is winning
Fava "Mine, all mine" Collector: guards the bean of its biggest field
Mung "Not worth the risk" Gambler: digs up fields to chase a new bean

Bots come in three levels: Easy, Normal and Smart. Games with 4 bots add the Coffee and Golden beans.


For developers

The game rules and the bots run in your browser, with no server.

Running it locally

You need Node 22.

npm ci
npm run dev

Then open http://localhost:5173.

How it's built

  • src/engine: the game rules and bots in plain TypeScript, with no Vue or browser code.
  • src/games: starting games, checking your moves, undo and trade quotes, on top of the engine.
  • src/api.ts: the calls the Vue app makes; they run the engine and save the game in localStorage.
  • src/components: the Vue 3 app, built with Vite.
  • scripts/balance.sim.ts: plays thousands of games with a scripted player to check how often each bot level loses.
  • trailer/: the launch trailer, built in Remotion. See trailer/README.md.

Checks

npm run typecheck && npm run lint && npm test && npm run build

Bot balance (takes a few minutes):

npm run sim

Set SIM_GAMES, SIM_LEVELS (easy normal smart) or SIM_MODES (notrade pro allbots smartbot) to change what it plays.

Deploying

The site is static files, so any static host works. See docs/cloudflare-pages.md for Cloudflare Pages on your own subdomain.

Credits

About

Bean Bazaar: a bean-trading card game you play in the browser against bots

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages