On new game, mark all players as guessers

This commit is contained in:
zikaeroh 2020-05-23 19:21:57 -07:00
parent f25ae50c77
commit e9f1627cc1
1 changed files with 6 additions and 1 deletions

View File

@ -124,10 +124,15 @@ func (r *Room) NewGame() {
panic("not enough words")
}
r.Version++
r.Winner = nil
r.Turn = Team(r.rand.Intn(len(r.Teams)))
r.Board = newBoard(r.Rows, r.Cols, words, r.Turn, len(r.Teams), r.rand)
for _, p := range r.Players {
p.Spymaster = false
}
r.Version++
}
func (r *Room) EndTurn(id PlayerID) {