Only update timer on reveal when turn changes
This commit is contained in:
parent
c655c5b3e5
commit
800ce1cbad
|
@ -317,8 +317,9 @@ func (r *Room) handleNote(playerID game.PlayerID, note *protocol.ClientNote) err
|
||||||
if err := json.Unmarshal(note.Params, ¶ms); err != nil {
|
if err := json.Unmarshal(note.Params, ¶ms); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
resetTimer = true
|
prevTurn := r.room.Turn
|
||||||
r.room.Reveal(playerID, params.Row, params.Col)
|
r.room.Reveal(playerID, params.Row, params.Col)
|
||||||
|
resetTimer = prevTurn != r.room.Turn
|
||||||
|
|
||||||
case protocol.NewGameMethod:
|
case protocol.NewGameMethod:
|
||||||
var params protocol.NewGameParams
|
var params protocol.NewGameParams
|
||||||
|
|
Loading…
Reference in New Issue