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

@ -84,8 +84,10 @@ func HandleJoinTeam(w http.ResponseWriter, r *http.Request) {
return
}
// reveal all cards
if role == "mime" {
fi.Room.RevealAllCards()
if fi.State.Role == "mime" {
fi.Room.MimeView() // there must be a better way
} else {
fi.Room.GuesserView()
}
// return html
tmpl, err := template.ParseGlob("components/*.html")
@ -163,7 +165,9 @@ func HandleStartGame(w http.ResponseWriter, r *http.Request) {
}
// reveal all cards
if fi.State.Role == "mime" {
fi.Room.RevealAllCards()
fi.Room.MimeView()
} else {
fi.Room.GuesserView()
}
// return html
tmpl, err := template.ParseGlob("components/*.html")