Fully playable heads-up Texas Hold’em with a modern, polished UI wrapped in a restrained Japanese classical aesthetic: indigo/navy palettes, subtle gold accents, washi texture, sumi-like motifs, and tasteful seigaiha patterns.
This repo contains:
- a static games hub at the repo root (no build step)
- a multiplayer platform (Fastify + Socket.IO server + React/Vite web app) under
apps/
cd /Users/sagnik/Downloads/Game
python3 -m http.server 5173Open http://localhost:5173/.
Other pages:
- Hub:
http://localhost:5173/hub/ - Ludo:
http://localhost:5173/ludo/ - Snake & Ladders:
http://localhost:5173/snake-ladders/ - Tetris:
http://localhost:5173/tetris/ - Chess:
http://localhost:5173/chess/ - Checkers:
http://localhost:5173/checkers/
Note: Some browsers block ES modules over
file://, so use a local server.
Prereqs: Node 20.11+ (see package.json).
- Install deps
cd /Users/sagnik/Downloads/Game
npm install- (Optional) Start Postgres + Redis (for persistence/leaderboards)
docker compose up -d- (Optional, if using Postgres) set env + create tables
cp apps/server/.env.example apps/server/.env
npm -w @game/server run prisma:generate
cd apps/server && npx prisma db push- Build TS once (server runs
dist/)
npm run build:engines
npm -w @game/server run build- Start dev servers
npm run dev- Web:
http://localhost:6969/ - Server:
http://localhost:3001/health
Notes:
- Web proxies
/api/*to the server (seeapps/web/vite.config.ts). - Auth endpoints are
POST /api/auth/loginandPOST /api/auth/signup(seeapps/server/src/auth/routes.ts). - If
DATABASE_URLis not set, the server falls back to an in-memory lobby store (leaderboard/auth won’t be available).
- Fold: give up the hand
- Check / Call: check if no bet; otherwise match the opponent’s bet
- Bet / Raise: set size with slider or presets; raises are interpreted as “call + extra”
Highest → lowest:
- Straight Flush — five in a row, same suit (A‑K‑Q‑J‑10 is a royal straight flush)
- Four of a Kind — four cards of the same rank
- Full House — three of a kind + a pair
- Flush — five cards same suit (not in sequence)
- Straight — five in a row (A can be low in A‑2‑3‑4‑5)
- Three of a Kind — three of the same rank
- Two Pair — two different pairs
- One Pair — one pair
- High Card — none of the above
Ties are broken by the highest relevant cards (“kickers”).
- Two players, one AI opponent.
- Dealer posts small blind, other posts big blind.
- Streets: preflop → flop → turn → river → showdown.
- Best 5-card hand from 7 cards (2 hole + 5 board) wins.
- Pot is split on ties.
./index.html
./styles.css
./assets/svg/
card-back.svg
icon-sound.svg
./src/
main.js
ui.js
sound.js
util.js
game/
engine.js
deck.js
evaluate.js
ai.js
See STYLEGUIDE.md.