I hate pointers?
This commit is contained in:
8
chess.go
8
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, " ")
|
||||
|
||||
Reference in New Issue
Block a user