def __str__(self): s = utils.to_str(self.uid, " ", self.x, " ", self.y, " ", self.enemy, " ", self.type, " ", self.hp, " ", self.shield, " ", self.cd, " ", self.cur_cmd.target_pos_x, " ", self.cur_cmd.target_pos_y, " ", self.cur_cmd.command_type, " ",self.cur_cmd.act_type," ", self.order.targetX, " ", self.order.targetY, " ", self.order.type, " ", self.next_cmd.target_pos_x, " ", self.next_cmd.target_pos_y, " ", self.next_cmd.command_type, " ", self.next_cmd.act_type, " ",self.death ) return s
def __str__(self): s = utils.to_str(self.id, " ", self.x, " ", self.y, " ", self.health, " ", self.max_health, " ", self.shield, " ", self.max_shield, " ", self.energy, " ", self.maxCD, " ", self.groundCD, " ", self.airCD, " ", self.idle, " ", self.visible, " ", self.type, " ", self.armor, " ", self.shieldArmor, " ", self.size, " ", self.pixel_x, " ", self.pixel_y, " ", self.pixel_size_x, " ", self.pixel_size_y, " ", self.groundATK, " ", self.airATK, " ", self.groundDmgType, " ", self.airDmgType, " ", self.groundRange, " ", self.airRange, " ") s += utils.to_str(len(self.orders), " ") for c in self.orders: s += utils.to_str(c.first_frame, " ", c.type, " ", c.targetId, " ", c.targetX, " ", c.targetY, " ") s += utils.to_str(self.velocityX, " ", self.velocityY) s += utils.to_str(" ", self.playerId) s += utils.to_str(" ", self.resources) return s
def Print(self): for uid, ut in self.units.iteritems(): print ut print "size_m size_e" s = utils.to_str(self.size_m, " ", self.size_e) s += "\n" for uid, F in self.features.iteritems(): s += utils.to_str(uid, " ") for f in F: s += utils.to_str(f, " ") s += "\n" for uid in self.units_id: s += utils.to_str(uid, " ") s += "\n" for uid in self.units_e_id: s += utils.to_str(uid, " ") s += "\n" for uid in self.units_dead_id: s += utils.to_str(uid, " ") s += "\n" print s
def __str__(self): s = utils.to_str(len(self.units), " ") for v in self.units.items(): s += utils.to_str(v[0], " ", len(v[1]), " ") for u in v[1]: s += utils.to_str(u, " ") s += utils.to_str(len(self.actions), " ") for v in self.actions.items(): s += utils.to_str(v[0], " ", len(v[1]), " ") for u in v[1]: s += utils.to_str(u.uid, " ", u.aid, " ", len(u.action), " ") for a in u.action: s += utils.to_str(a, " ") s += utils.to_str(len(self.resources), " ") for r in self.resources.items(): s += utils.to_str(r[0], " ", r[1], " ") s += utils.to_str(len(self.bullets), " ") for b in self.bullets: s += utils.to_str(b, " ") s += utils.to_str(self.reward, " ", self.is_terminal) return s
def __str__(self): s = utils.to_str(self.type, " ", self.x, " ", self.y) return s
def __str__(self): s = utils.to_str(self.ore, " ", self.gas, " ") s += utils.to_str(self.used_psi, " ", self.total_psi) return s