feat: add models/state.go
This commit is contained in:

committed by
Grail Finder (aider)

parent
322743e33d
commit
56c94c3987
21
models/state.go
Normal file
21
models/state.go
Normal file
@ -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
|
||||||
|
}
|
Reference in New Issue
Block a user