def get_iteration(self, iteration):
     Side = Battle.Side()
     i = 0
     for unit in self.allowed_units:
         unit = Unit.ImportUnit(self.file_units, name=self.allowed_units[i], amount=iteration[i])
         Side.add_unit(unit)
         i += 1
Example #2
0
 def setUp(self):
     self.Side = Battle.Side()
     self.file_path = "./Adventures/CN/units.json"
     self.unit_cav = Unit.ImportUnit(self.file_path, abbrev="Cava", amount=100)
     self.unit_sol = Unit.ImportUnit(self.file_path, abbrev="S", amount=100)
     self.unit_arc = Unit.ImportUnit(self.file_path, abbrev="Arc", amount=100)
     self.Side.add_unit(self.unit_arc)
     self.Side.add_unit(self.unit_sol)
     self.Side.add_unit(self.unit_cav)
Example #3
0
 def setUp(self):
     self.Side = Battle.Side()
     self.file_path = "./Adventures/CN/units.json"
     self.name = "soldat"
     self.abbrev = "S"