Fix broken server code; always test before pushing...

This commit is contained in:
zikaeroh 2020-05-24 00:11:41 -07:00
parent 14a81762ac
commit ec12d4f3e7
1 changed files with 3 additions and 2 deletions

View File

@ -519,7 +519,8 @@ func (r *Room) createRoomState(spymaster bool) *protocol.State {
Bomb: tile.Bomb, Bomb: tile.Bomb,
} }
if !tile.Revealed && room.Winner != nil && r.hideBomb { if view.Bomb && !tile.Revealed && room.Winner == nil && r.hideBomb {
view.Neutral = true
view.Bomb = false view.Bomb = false
} }
@ -631,7 +632,7 @@ func (r *Room) changeHideBomb(HideBomb bool) {
return return
} }
r.hideBomb = true r.hideBomb = HideBomb
r.room.Version++ r.room.Version++
r.sendAll() r.sendAll()
} }