示例#1
0
 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);
 }
示例#2
0
 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);
 }