public static bool SaveBot() { foreach (ControlBase control in Screen.controls.Keys) { if (control.IsLearnable) { GameControlBase CastControl = (GameControlBase)control; LearningBot bot = CastControl.GetBot(); NetworkLoader.SaveLearningBot(NET_SAVE_NAME, bot); return(true); } } return(false); }
internal static bool LoadOpponent() { foreach (ControlBase control in Game1.Screen.controls.Keys) { if (control.IsLearnable) { GameControlBase CastControl = (GameControlBase)control; LearningBot bot = NetworkLoader.LoadLearningBot(OPPONENT_SAVE_NAME); bot.Setup(CastControl, bot.BotTurn); CastControl.SetOpponent(bot); return(true); } } return(false); }
public static bool LoadBot() { foreach (ControlBase control in Screen.controls.Keys) { if (control.IsLearnable) { GameControlBase CastControl = (GameControlBase)control; LearningBot bot = NetworkLoader.LoadLearningBot(NET_SAVE_NAME); bot.Setup(CastControl, bot.BotTurn); CastControl.SetBot(bot); return(true); } } return(false); }
public override void SetBot(LearningBot bot) { base.SetBot(bot); Restart(Mode); }
/// <summary> /// Attach the bot to the control, after this StartLearn can be called. /// </summary> public void AttachBot(LearningBot botAttach, Players botPlayer) { bot = botAttach; BotPlayer = botPlayer; }
public virtual void SetBot(LearningBot bot) { this.bot = bot; }
public virtual void SetOpponent(LearningBot bot) { opponent = bot; }
public TelegramController(LearningBot bot, ILifetimeScope scope) { _bot = bot; _scope = scope; }