Enha: difference between cards for mime and revealed for all
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user