Feat: which bot to move

This commit is contained in:
Grail Finder
2025-05-20 16:16:57 +03:00
parent 2342c56aed
commit 59cccbbe8e
6 changed files with 81 additions and 12 deletions

View File

@ -80,6 +80,11 @@ func NewBot(role, team, name, roomID string, cfg *config.Config) (*Bot, error) {
return nil, errors.New("cannot join after game started")
}
room.PlayerList = append(room.PlayerList, name)
bp := models.BotPlayer{
Role: models.StrToUserRole(role),
Team: models.StrToUserTeam(team),
}
room.BotMap[name] = bp
switch team {
case "red":
if role == "mime" {