Enha: difference between cards for mime and revealed for all

This commit is contained in:
Grail Finder
2025-06-30 10:27:54 +03:00
parent 643a9a035a
commit 42c1f461b0
6 changed files with 42 additions and 9 deletions

View File

@ -49,10 +49,11 @@ func HandleHome(w http.ResponseWriter, r *http.Request) {
}
fi, _ := getFullInfoByCtx(r.Context())
if fi != nil && fi.Room != nil && fi.State != nil {
fi.Room.UpdateCounter()
if fi.State.Role == "mime" {
fi.Room.RevealAllCards()
fi.Room.MimeView() // there must be a better way
} else {
fi.Room.UpdateCounter()
fi.Room.GuesserView()
}
}
if fi != nil && fi.Room == nil {