Do problematic access verbosely to try and get failure point

This commit is contained in:
zikaeroh 2020-05-27 01:03:15 -07:00
parent 9464868137
commit 5db12a008c
1 changed files with 7 additions and 1 deletions

View File

@ -462,7 +462,13 @@ func (r *Room) createStateFor(playerID game.PlayerID) *protocol.State {
r.state = r.createStateCache() r.state = r.createStateCache()
} }
if r.room.Players[playerID].Spymaster { // Temporary verbose access to attempt to figure out which of these is (impossibly) failing.
room := r.room
players := room.Players
player := players[playerID]
spymaster := player.Spymaster
if spymaster {
return r.state.spymaster return r.state.spymaster
} }
return r.state.guesser return r.state.guesser