Browse Source

I hate pointers?

master
Gregory Rudolph 5 years ago
parent
commit
78b330fc3f
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 8
      chess.go

8
chess.go

@ -21,11 +21,11 @@ func chessCommand(m chat1.MsgSummary) {
return return
} }
if parts[1] == "show" { if parts[1] == "show" {
go showBoard(m, &g) go showBoard(m, g)
return return
} }
submitMove(m, &g) submitMove(m, g)
return return
} }
log.LogInfo("Game not found") 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") defer log.PanicSafe("showBoard")
// create file // create file
log.LogInfo("Creating file for %+v.svg", m.ConvID) 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 log.PanicSafe("submitMove")
defer saveConfig() defer saveConfig()
parts := strings.Split(m.Content.Text.Body, " ") parts := strings.Split(m.Content.Text.Body, " ")

Loading…
Cancel
Save