def safe_action(self, action, unit_type, args): if M.check_params(self, action, unit_type, args, 1): self.obs = self.env.step([sc2_actions.FunctionCall(action, args)])[0] 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()