22 lines
370 B
Go
22 lines
370 B
Go
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
|
|
}
|