public void ApplyActionToBot(BotObject bot) { if (bot.PendingActions != null && bot.PendingActions.Count > 0) { bot.CurrentAction = bot.PendingActions[0]; bot.PendingActions.RemoveAt(0); } if (bot.CurrentAction == default) { return; } IActionHandler handler = actionHandlerResolver.ResolveHandler(bot.CurrentAction); handler.ProcessAction(bot); bot.LastAction = bot.CurrentAction; }