diff --git a/chess.go b/chess.go index 07d1dfa..a7968ba 100644 --- a/chess.go +++ b/chess.go @@ -21,11 +21,11 @@ func chessCommand(m chat1.MsgSummary) { return } if parts[1] == "show" { - go showBoard(m, &g) + go showBoard(m, g) return } - submitMove(m, &g) + submitMove(m, g) return } log.LogInfo("Game not found") @@ -66,7 +66,7 @@ func chessCommand(m chat1.MsgSummary) { } -func showBoard(m chat1.MsgSummary, g *Game) { +func showBoard(m chat1.MsgSummary, g Game) { defer log.PanicSafe("showBoard") // create file log.LogInfo("Creating file for %+v.svg", m.ConvID) @@ -107,7 +107,7 @@ func showBoard(m chat1.MsgSummary, g *Game) { } } -func submitMove(m chat1.MsgSummary, g *Game) { +func submitMove(m chat1.MsgSummary, g Game) { defer log.PanicSafe("submitMove") defer saveConfig() parts := strings.Split(m.Content.Text.Body, " ")