Enha: sse update on actions

This commit is contained in:
Grail Finder
2025-05-10 11:03:23 +03:00
parent 416cc63ec0
commit 35e215e26f
12 changed files with 89 additions and 73 deletions

View File

@ -34,6 +34,7 @@ func StrToWordColor(s string) WordColor {
type Team struct {
Guessers []string
Mime string
Color string
}
type Room struct {
@ -109,6 +110,14 @@ func (r *Room) RevealAllCards() {
}
}
func (r *Room) RevealSpecificWord(word string) {
for i, card := range r.Cards {
if card.Word == word {
r.Cards[i].Revealed = true
}
}
}
type WordCard struct {
Word string
Color WordColor