feat: add models/state.go

This commit is contained in:
Grail Finder
2025-05-03 07:57:22 +03:00
committed by Grail Finder (aider)
parent 322743e33d
commit 56c94c3987

21
models/state.go Normal file
View 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
}