refactoring

This commit is contained in:
Settel 2021-09-06 21:26:55 +02:00
parent 74b14ef337
commit ecfea20df1
4 changed files with 3 additions and 11 deletions

View File

@ -5,8 +5,4 @@ export default function(data) {
store.commit('game/setStateAndPhase', data.game)
store.commit('players/setPlayers', data.game)
store.commit('round/setRound', data.game)
if (data.game.state === 'play' && data.game.phase === 'reveal-start-2') {
store.commit('selection/clearSelection')
}
}

View File

@ -50,10 +50,6 @@ func (gm *Game) getSelections() map[string]bool {
}
func (gm *Game) getRevelation() *syncdata.Revelation {
if gm.state != STATE_PLAY || gm.phase != PHASE_REVEAL_SHOW_COUNT {
return nil
}
revelation := syncdata.Revelation{
Votes: gm.round.revelation.votes,
}

View File

@ -15,9 +15,6 @@ func (gm *Game) revealShowCount() {
fmt.Println(err)
return
}
gm.round.revelation = Revelation{
votes: make(map[string][]string, 0),
}
gm.notifyClients()
time.Sleep(1 * time.Second)

View File

@ -28,6 +28,9 @@ func (gm *Game) setupRound() {
gm.round = Round{
selections: make(map[string]string, 0),
revelation: Revelation{
votes: make(map[string][]string, 0),
},
}
}