Exemple #1
0
 def test_building_distribution_morph(self):
     for building_id in (0x83, 0x83, 0x95, 0x8E):
         instance = actions.Morph(0)
         instance.building_type_id = building_id
         self.player.actions.append(instance)
     distribution = utils.building_distribution(self.player)
     self.assertEquals(len(distribution), 3)
     self.assertEquals(distribution['Hatchery'], 2)
     self.assertEquals(distribution['Extractor'], 1)
     self.assertEquals(distribution['Spawning Pool'], 1)
Exemple #2
0
 def test_building_distribution_build(self):
     for building_id in (0x6D, 0x6D, 0x6F, 0x6B):
         instance = actions.Build(0)
         instance.building_type_id = building_id
         self.player.actions.append(instance)
     distribution = utils.building_distribution(self.player)
     self.assertEquals(len(distribution), 3)
     self.assertEquals(distribution['Supply Depot'], 2)
     self.assertEquals(distribution['Barracks'], 1)
     self.assertEquals(distribution['ComSat'], 1)