Browse Source

I hate pointers?

master
Gregory Rudolph 4 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) { @@ -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) { @@ -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) { @@ -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, " ")

Loading…
Cancel
Save