def __init__(self, factory_data, transport_factory, weapon_factory, armor_factory, unit_class=Unit): self.transport_factory = transport_factory self.armor_factory = armor_factory self.weapon_factory = weapon_factory Factory.__init__(self, factory_data, unit_class)
def __init__(self, factory_data, factory_class=UnitFactory, transport_class=TransportFactory, weapon_class=WeaponFactory, armor_class=ArmorFactory): Factory.__init__(self, factory_data, factory_class) self.transport_class = transport_class self.weapon_class = weapon_class self.armor_class = armor_class
def __init__(self, factory_data, unit_factory_factory, building_factory, army_class=Army): Factory.__init__(self, factory_data, army_class) self.unit_factory_factory = unit_factory_factory self.building_factory = building_factory return
def __init__(self, factory_data, tile_class=Tile): Factory.__init__(self, factory_data, tile_class) return
def __init__(self, factory_data, tile_factory, creation_class=Board): Factory.__init__(self, factory_data, creation_class) self.tile_factory = tile_factory
def validate_test(): factory = Factory({}, MockClass) assert_raises(NotImplementedError, factory.validate_data, '') assert_raises(NotImplementedError, factory.create, '')
def __init__(self, factory_data, transport_class=Transport): Factory.__init__(self, factory_data, transport_class) return
def __init__(self, factory_data, building_class=Building): Factory.__init__(self, factory_data, building_class)
def __init__(self, factory_data, weapon_class=Weapon): Factory.__init__(self, factory_data, weapon_class) return
def __init__(self, factory_data, armor_class=Armor): Factory.__init__(self, factory_data, armor_class)