Send win event after sending board event
This commit is contained in:
parent
5113d372ef
commit
50b743a468
2 changed files with 4 additions and 6 deletions
|
@ -696,9 +696,6 @@ func (g *serverGame) handleWin() bool {
|
|||
g.Reset()
|
||||
g.replay = g.replay[:0]
|
||||
}
|
||||
g.eachClient(func(client *serverClient) {
|
||||
client.sendEvent(winEvent)
|
||||
})
|
||||
|
||||
if g.client1 != nil && g.client1.account != nil {
|
||||
g.Player1.Rating = g.client1.account.casual.getRating(g.Variant, g.Points > 1) / 100
|
||||
|
@ -708,6 +705,7 @@ func (g *serverGame) handleWin() bool {
|
|||
}
|
||||
g.eachClient(func(client *serverClient) {
|
||||
g.sendBoard(client, false)
|
||||
client.sendEvent(winEvent)
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -1254,11 +1254,11 @@ COMMANDS:
|
|||
clientGame.Turn = 1
|
||||
clientGame.Roll1 = 6
|
||||
clientGame.Roll2 = 1
|
||||
clientGame.Roll3 = 1
|
||||
clientGame.Variant = 2
|
||||
clientGame.Roll3 = 0
|
||||
clientGame.Variant = 0
|
||||
clientGame.Player1.Entered = true
|
||||
clientGame.Player2.Entered = true
|
||||
clientGame.Board = []int8{0, 0, 0, 0, 0, -3, 0, 0, -3, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 9, 3, 1, -5, 1, 1, 0}
|
||||
clientGame.Board = []int8{0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
|
||||
log.Println(clientGame.Board[0:28])
|
||||
|
||||
|
|
Loading…
Reference in a new issue