]> Skullheadx's Git Forge - monopoly-web.git/commitdiff
lighter ctx for logging
authorSkullheadx <admonty1@protonmail.com>
Mon, 8 Jun 2026 21:47:52 +0000 (17:47 -0400)
committerSkullheadx <admonty1@protonmail.com>
Mon, 8 Jun 2026 21:47:52 +0000 (17:47 -0400)
game/game.go
game/todo

index 06cad22a1c5d439110be9e7d6b64097d012cf292..0025066a6c54e1b56c5a25157206d8ebeb403085 100644 (file)
@@ -37,7 +37,20 @@ type MonopolyServer struct {
 }
 
 func (ctx *Context) logGameCtx() {
-       data, _ := json.MarshalIndent(ctx, "", "  ")
+
+       type miniContext struct {
+               Players    Players
+               Turn       Turn
+               Visitors   Visitors
+               properties Properties
+       }
+
+       data, _ := json.MarshalIndent(miniContext{
+               Players:    ctx.Players,
+               Turn:       ctx.Turn,
+               Visitors:   ctx.Visitors,
+               properties: ctx.Properties,
+       }, "", "  ")
        fmt.Println(string(data))
 }
 
index 76c85854bcd783e12c099ee8edb73347b5047efa..bb30a255741dc2ae14c730458de7c2230d629e22 100644 (file)
--- a/game/todo
+++ b/game/todo
@@ -10,6 +10,4 @@
 
 - TODO Bankruptcy 
 
-- TODO user auth
-
-- TODO Server Side Events (SSE) for updating game on client
+- TODO Unowned event