Only update timer on reveal when turn changes

This commit is contained in:
zikaeroh 2020-05-23 21:27:50 -07:00
parent c655c5b3e5
commit 800ce1cbad
1 changed files with 2 additions and 1 deletions

View File

@ -317,8 +317,9 @@ func (r *Room) handleNote(playerID game.PlayerID, note *protocol.ClientNote) err
if err := json.Unmarshal(note.Params, &params); err != nil { if err := json.Unmarshal(note.Params, &params); 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