Feat: remove bot
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user