Exemple #1
0
 def safe_action(self, action, unit_type, args):
     if M.check_params(self, action, unit_type, args, 1):
         obs = self.env.step([sc2_actions.FunctionCall(action, args)])[0]
         self.obs = obs
         self.step += 1
         self.update_result()
         self.set_flag()
 def select(self, action, unit_type, args):
     # safe select
     if M.check_params(self, action, unit_type, args, 0):
         self.obs = self.env.step([sc2_actions.FunctionCall(action, args)])[0]
         self.on_select = unit_type
         self.update_result()
         self.step += 1
         self.set_flag()