示例#1
0
 def test___init__(self):
     instance = Map('Classic')
     self.assertEqual(
         instance.name,
         'Classic',
     )
     self.assertFalse(instance.loaded)
示例#2
0
    def setUpClass(cls):
        cls.map = Map('Classic')
        cls.map.load()

        cls.geography = Geography(name='Inland',
                                  map=cls.map,
                                  force='Army',
                                  orders=['Hold'])
示例#3
0
    def load(self):
        """ Loads the variant information from the JSON file with
        the name of the variant.

        """
        with open(f'variants/{self.name}.json') as file:
            data = json_load(file)

        for key, value in data.items():
            setattr(self, key, value)

        self.powers = make_instances(self.powers, Power)

        self.map = Map(self.map)
        self.map.load()

        self.loaded = True
示例#4
0
 def setUpClass(cls):
     cls.map = Map('Classic')
     cls.map.load()
示例#5
0
 def setUpClass(cls):
     cls.RPSmap = Map('RPS')
     cls.RPSmap.load()
     cls.ClassicMap = Map('Classic')
     cls.ClassicMap.load()
示例#6
0
 def setUpClass(cls):
     cls.map = Map('Classic')
     cls.map.load()
     cls.province = cls.map.provinces[34]
     cls.location = cls.map.locations[28]
     cls.geography = cls.location.geography