games: UNO becomes a table you sit at, and the pot that pays whoever goes out first
Phase D backend: UNO is now a session like hold'em, not a single stake. You sit
with a buy-in stack, ante into a pot each hand, and leave with what's in front of
you. The engine lost its `You` constant and its measured multiples: ApplyMove
takes the acting seat, New takes a seat list, a Tier carries an ante instead of a
Base, and a hand settles by moving the pot to the winner (less rake, and never
when a bot takes it) rather than paying a multiple. A mercy kill puts a seat out
of the hand, not out of the game — the last one standing takes the pot.
The redaction moved to the web layer, where hold'em's already lives: the engine
now stamps every seat's hand onto its events, and viewUno/viewUnoEvents strip
everything that isn't the viewer's own. TestUnoViewNeverLeaksAnotherSeatsCards is
the wall. unoTable implements tableGame; /uno/{sit,move,leave,tables,stream,chat,
say} mirror hold'em, with stream/chat/say now shared game-agnostic handlers.
The frontend is not done: uno.js still calls the retired solo endpoint, so the
page renders but is not yet playable. All engine and web tests are green.
Claude-Session: https://claude.ai/code/session_013M5nD7PgUboJXoDcYHzpuJ
This commit is contained in:
@@ -124,16 +124,21 @@ func (s *Server) casinoRoutes(mux *http.ServeMux) {
|
||||
mux.HandleFunc("POST /api/games/trivia/start", s.handleTriviaStart)
|
||||
mux.HandleFunc("POST /api/games/trivia/answer", s.handleTriviaAnswer)
|
||||
|
||||
mux.HandleFunc("POST /api/games/uno/start", s.handleUnoStart)
|
||||
mux.HandleFunc("POST /api/games/uno/sit", s.handleUnoSit)
|
||||
mux.HandleFunc("POST /api/games/uno/move", s.handleUnoMove)
|
||||
mux.HandleFunc("POST /api/games/uno/leave", s.handleUnoLeave)
|
||||
mux.HandleFunc("GET /api/games/uno/tables", s.handleUnoLobby)
|
||||
mux.HandleFunc("GET /api/games/uno/stream", s.handleTableStream)
|
||||
mux.HandleFunc("GET /api/games/uno/chat", s.handleTableChat)
|
||||
mux.HandleFunc("POST /api/games/uno/say", s.handleTableSay)
|
||||
|
||||
mux.HandleFunc("POST /api/games/holdem/sit", s.handleHoldemSit)
|
||||
mux.HandleFunc("POST /api/games/holdem/move", s.handleHoldemMove)
|
||||
mux.HandleFunc("POST /api/games/holdem/leave", s.handleHoldemLeave)
|
||||
mux.HandleFunc("GET /api/games/holdem/tables", s.handleHoldemLobby)
|
||||
mux.HandleFunc("GET /api/games/holdem/stream", s.handleHoldemStream)
|
||||
mux.HandleFunc("GET /api/games/holdem/chat", s.handleHoldemChat)
|
||||
mux.HandleFunc("POST /api/games/holdem/say", s.handleHoldemSay)
|
||||
mux.HandleFunc("GET /api/games/holdem/stream", s.handleTableStream)
|
||||
mux.HandleFunc("GET /api/games/holdem/chat", s.handleTableChat)
|
||||
mux.HandleFunc("POST /api/games/holdem/say", s.handleTableSay)
|
||||
}
|
||||
|
||||
// requirePlayer sends an anonymous visitor to sign in and comes back here after.
|
||||
|
||||
Reference in New Issue
Block a user