def test_ain_vs_beid(self): print "\n=======ain,beid" a = self._build_force("ain", SHIPS, "player_g", fleet.AGGRESSIVE) b = self._build_force("beid", SHIPS, "player_h", fleet.DEFENSIVE) attack.Attack(a, b, b._player.get_planetary()) attack.Attack(a, b, b._player.get_planetary()) attack.Attack(a, b, b._player.get_planetary()) print self._force_diff(a, b)
def tick(self, game): # run tick on systems and check that they are still usable for k, v in self.systems.iteritems(): # tick v.tick(game, self) # if there's someone on the doorstep, create attack if (self.hostile_fleets): # register owner fleets if they are not absent for fleet in self.get_owner().get_fleets(): if not fleet.get_mission(): self.register_friendly_fleet(fleet) self.current_attack = attack.Attack(force.Force(self.hostile_fleets),\ force.Force(self.friendly_fleets), self) self.post_tick_cleanup()