diff --git a/models/state.go b/models/state.go new file mode 100644 index 0000000..440602b --- /dev/null +++ b/models/state.go @@ -0,0 +1,21 @@ +package models + +type UserTeam string + +const ( + UserTeamBlue = "blue" + UserTeamRed = "red" + UserTeamNone = "none" +) + +func StrToUserTeam(s string) WordColor { + switch s { + case "blue": + return UserTeamBlue + // finish this switch; ai! + +// every gohtml page should be recreated on reload in the needed state +type UserState struct { + Username string + Room RoomPublic +}