diff options
Diffstat (limited to 'server/api')
| -rw-r--r-- | server/api/game.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/api/game.go b/server/api/game.go index bccf12a..636ff66 100644 --- a/server/api/game.go +++ b/server/api/game.go @@ -1,11 +1,12 @@ package api import ( - "github.com/gorilla/websocket" "net/http" "sakura/engine" "slices" "uuid" + + "github.com/gorilla/websocket" ) type Conn struct { @@ -73,7 +74,12 @@ func PumpRead(id uuid.UUID, g *engine.Game, conn *websocket.Conn) { if err != nil { break } - g.Actions[interaction].Then(g) + a := g.Actions[interaction] + if a == nil { + continue + } + a.Then(g) + g.ActionToHistory(a) Update(id, g) } } |
