Feat: remove bot

This commit is contained in:
Grail Finder
2025-06-27 07:35:25 +03:00
parent 12fe92b261
commit 86b1ecf82e
9 changed files with 165 additions and 100 deletions

View File

@ -97,6 +97,16 @@ type Room struct {
LogJournal []string
}
// FindBotByTeamRole returns bot name if found; otherwise empty string
func (r *Room) FindBotByTeamRole(team, role string) string {
for bn, b := range r.BotMap {
if b.Role == StrToUserRole(role) && b.Team == StrToUserTeam(team) {
return bn
}
}
return ""
}
func (r *Room) FetchLastClue() (*Action, error) {
for i := len(r.ActionHistory) - 1; i >= 0; i-- {
if r.ActionHistory[i].Action == string(ActionTypeClue) {