diff --git a/models/state.go b/models/state.go index 440602b..a7a8bb0 100644 --- a/models/state.go +++ b/models/state.go @@ -12,9 +12,14 @@ func StrToUserTeam(s string) WordColor { switch s { case "blue": return UserTeamBlue - // finish this switch; ai! + case "red": + return UserTeamRed + case "none": + return UserTeamNone + } + return WordColorUserTeamNone +} -// every gohtml page should be recreated on reload in the needed state type UserState struct { Username string Room RoomPublic