Feat: show colors by pressing words
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user