refactoring
This commit is contained in:
parent
74b14ef337
commit
ecfea20df1
@ -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')
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user