Fix: show color; add bot [WIP]

This commit is contained in:
Grail Finder
2025-05-20 13:10:09 +03:00
parent 24f940f175
commit 2342c56aed
11 changed files with 267 additions and 36 deletions

View File

@ -41,7 +41,7 @@ type Team struct {
type Action struct {
Actor string
ActorColor string
Action string // clue | guess
Action WordColor // clue | guess
Word string
WordColor string
Number string // for clue
@ -60,6 +60,7 @@ type Room struct {
RedTeam Team
BlueTeam Team
Cards []WordCard
WCMap map[string]WordColor
Result uint8 // 0 for unknown; 1 is win for red; 2 if for blue;
BlueCounter uint8
RedCounter uint8
@ -169,9 +170,9 @@ func (r *Room) RevealSpecificWord(word string) {
}
type WordCard struct {
Word string
Color WordColor
Revealed bool
Word string `json:"word"`
Color WordColor `json:"color"`
Revealed bool `json:"revealed"`
}
type GameSettings struct {