How hullqin/poker works
This is a small, in-memory backend for multiplayer Dou Dizhu. Players connect through the React client, join or create a room, and then play through WebSocket messages; room and game state is kept in process memory, with no database. The graph separates connection handling, room/presence management, and game phases. The README documents spectators, reconnects, and three- or four-player modes; some room and game implementation is omitted from the excerpts, so uncertain links are left out or marked unverified.
Main entry points: server.py WebSocket session · room.py Room lifecycle · error.py Disconnect errors
Components 14
Connections
- ASGI server
server.py - HTTP asset serving
server.py - WebSocket session
server.py - Disconnect errors
error.py
Rooms and presence
- Room registry
server.py - Room lifecycle
room.py - Seats and visitors
room.py - Presence and recovery
room.py
Game play
- Game setup and deal
room.py - Landlord selection
room.py - Card play and undo
room.py - Game state broadcast
room.py
Other components
- Players
- React client
Connections 17
- Players → React client: use
README.md - React client → WebSocket session: send messages
README.md - React client → HTTP asset serving: request assets
README.md - ASGI server → HTTP asset serving: routes HTTP
server.py - ASGI server → WebSocket session: routes WebSocket
server.py - WebSocket session → Disconnect errors: raises
server.py - WebSocket session → Room registry: reads and updates
server.py - WebSocket session → Room lifecycle: calls room methods
server.py - Room lifecycle → Seats and visitors: manages membership
room.py - Room lifecycle → Presence and recovery: tracks online state
room.py - WebSocket session → Game setup and deal: starts game
server.py - WebSocket session → Landlord selection: calls selection
server.py - WebSocket session → Card play and undo: calls play or undo
server.py - Game setup and deal → Game state broadcast: sends game state
room.py - Landlord selection → Game state broadcast: sends game state
room.py - Card play and undo → Game state broadcast: sends game state
room.py - Room lifecycle → Game setup and deal: creates game
room.py