More UX improvements.

This commit is contained in:
Greyson Parrelli
2026-07-24 09:07:54 -04:00
parent 962e3bb5ff
commit 10b6346874
7 changed files with 60 additions and 20 deletions
+8 -3
View File
@@ -51,9 +51,14 @@ func (s *Server) Handler() http.Handler {
return mux
}
// handleCatalog returns every card in the game, for the debug panel.
func (s *Server) handleCatalog(w http.ResponseWriter, _ *http.Request) {
writeJSON(w, game.Catalog())
// handleCatalog returns every card in a pack (?pack=…, default Turtle), for the
// debug panel. Unknown packs fall back to the default.
func (s *Server) handleCatalog(w http.ResponseWriter, req *http.Request) {
pack := req.URL.Query().Get("pack")
if pack == "" {
pack = game.DefaultPack
}
writeJSON(w, game.CatalogForPack(pack))
}
// room is one live game plus its connections.