Skip to content

Sagnik-cloudangles/multiplayer-game-platform

Repository files navigation

Kiku Hold’em (Edo/Meiji Poker)

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.

Run locally

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 5173

Open 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.

Run the multiplayer platform (server + web)

Prereqs: Node 20.11+ (see package.json).

  1. Install deps
cd /Users/sagnik/Downloads/Game
npm install
  1. (Optional) Start Postgres + Redis (for persistence/leaderboards)
docker compose up -d
  1. (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
  1. Build TS once (server runs dist/)
npm run build:engines
npm -w @game/server run build
  1. Start dev servers
npm run dev
  • Web: http://localhost:6969/
  • Server: http://localhost:3001/health

Notes:

  • Web proxies /api/* to the server (see apps/web/vite.config.ts).
  • Auth endpoints are POST /api/auth/login and POST /api/auth/signup (see apps/server/src/auth/routes.ts).
  • If DATABASE_URL is not set, the server falls back to an in-memory lobby store (leaderboard/auth won’t be available).

Controls

  • 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”

Poker hand ranking chart

Highest → lowest:

  1. Straight Flush — five in a row, same suit (A‑K‑Q‑J‑10 is a royal straight flush)
  2. Four of a Kind — four cards of the same rank
  3. Full House — three of a kind + a pair
  4. Flush — five cards same suit (not in sequence)
  5. Straight — five in a row (A can be low in A‑2‑3‑4‑5)
  6. Three of a Kind — three of the same rank
  7. Two Pair — two different pairs
  8. One Pair — one pair
  9. High Card — none of the above

Ties are broken by the highest relevant cards (“kickers”).

Rules (Texas Hold’em)

  • 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.

Project structure

./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

Style guide

See STYLEGUIDE.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors