I hate pointers?

This commit is contained in:
2020-10-31 00:20:05 -04:00
parent bf03afcc3e
commit 78b330fc3f

View File

@ -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, " ")