From ec12d4f3e79a5e9694d8fa61d79ded415b49b3d6 Mon Sep 17 00:00:00 2001 From: zikaeroh <48577114+zikaeroh@users.noreply.github.com> Date: Sun, 24 May 2020 00:11:41 -0700 Subject: [PATCH] Fix broken server code; always test before pushing... --- internal/server/server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/server/server.go b/internal/server/server.go index 606f431..9375843 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -519,7 +519,8 @@ func (r *Room) createRoomState(spymaster bool) *protocol.State { 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 } @@ -631,7 +632,7 @@ func (r *Room) changeHideBomb(HideBomb bool) { return } - r.hideBomb = true + r.hideBomb = HideBomb r.room.Version++ r.sendAll() }