public void CmdWait(int bid) { if (!Bots.ContainsKey(bid)) { throw new CommandException("wait", "bot does not exist"); } }
public void CmdFlip(int bid) { if (!Bots.ContainsKey(bid)) { throw new CommandException("flip", "bot does not exist"); } Harmonics = !Harmonics; }
public Bot GetBot(int id) { if (Bots.ContainsKey(id)) { return(Bots[id]); } var r = new Bot(id); Bots.Add(id, r); return(r); }
public async Task UpdateBot(InventoryBot bot) { await _dao.UpdatePlayerBotAsync(bot); if (bot.RoomId != 0) { Bots.Remove(bot.Id); } else { if (!Bots.ContainsKey(bot.Id)) { Bots.Add(bot.Id, bot); } } }