Enha: sse update on actions
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user