Feat: show colors by pressing words

This commit is contained in:
Grail Finder
2025-05-02 15:21:28 +03:00
parent 8b768f919b
commit 322743e33d
6 changed files with 48 additions and 33 deletions

View File

@ -5,10 +5,11 @@ import "time"
type WordColor string
const (
WordColorWhite = "white"
WordColorBlue = "blue"
WordColorRed = "red"
WordColorBlack = "black"
WordColorWhite = "white"
WordColorBlue = "blue"
WordColorRed = "red"
WordColorBlack = "black"
WordColorUknown = "beige"
)
func StrToWordColor(s string) WordColor {
@ -22,7 +23,7 @@ func StrToWordColor(s string) WordColor {
case "black":
return WordColorBlack
default:
return "beige"
return WordColorUknown
}
}
@ -34,6 +35,7 @@ type Room struct {
RoomLink string
CreatorName string `json:"creator_name"`
PlayerList []string `json:"player_list"`
TeamTurn string
RedMime string
BlueMime string
RedGuessers []string
@ -56,6 +58,7 @@ type RoomPublic struct {
CreatorName string `json:"creator_name"`
GameSettings *GameSettings `json:"settings"`
RedMime string
TeamTurn string
BlueMime string
RedGuessers []string
BlueGuessers []string