Wuhan Mahjong
A real-time multiplayer Wuhan Mahjong game (红中赖子杠). Play with friends online or practice against AI bots with configurable difficulty. Features room-based gameplay, full Wuhan rules with wild cards, reconnection support, and a multiplicative scoring system.
// tech stack
Vue 3TypeScriptGoPostgreSQLWebSocketPiniaDockerVite
// features
- Real-time 4-player games via WebSocket connections
- AI bots with easy, medium, and hard difficulty levels
- Room-based gameplay with shareable room codes
- Full Wuhan mahjong rules: wild cards, rob kong, kong draw win, last tile win, 258 pair rule
- Guest mode with no login required
- Seamless reconnection support after disconnection
// architecture
Vue 3 frontend with Pinia stores and composables for WebSocket/game state. Go backend with game engine (tiles, hand validation, scoring), room management, WebSocket handler, and AI bot logic. Shared types via JSON Schema with code generation for both languages.