Feat: ru words; make last clue more prominent

This commit is contained in:
Grail Finder
2025-06-30 15:29:50 +03:00
parent 42c1f461b0
commit 288e74c95b
7 changed files with 3378 additions and 37 deletions

View File

@ -135,6 +135,15 @@ func (r *Room) FetchLastClue() (*Action, error) {
return nil, errors.New("no clue in history")
}
func (r *Room) FetchLastClueWord() string {
for i := len(r.ActionHistory) - 1; i >= 0; i-- {
if r.ActionHistory[i].Action == string(ActionTypeClue) {
return r.ActionHistory[i].Word
}
}
return ""
}
func (r *Room) GetPlayerByName(name string) (role UserRole, team UserTeam, found bool) {
if r.RedTeam.Mime == name {
return "mime", "red", true