コード例 #1
0
 def build_from_nexus(self, unit):
     min_produce_len = MIN_PRODUCE_LEN  # default is 5, this is represent module N_6:Production queue
     for b in self.production_building_list:
         if type(b) == type(P.Nexus()):
             produce_len = b.queue.size()
             if produce_len < min_produce_len:
                 b.queue.enqueue(unit)
コード例 #2
0
    def init_feature(self):
        self.gateway_num = 0
        self.pylon_num = 0
        self.Assimilator_num = 0
        self.CyberneticsCore_num = 0
        self.probe_num = 0
        self.zealot_num = 0
        self.Stalker_num = 0
        self.collected_mineral = 0
        self.spent_mineral = 0
        self.collected_gas = 0
        self.spent_gas = 0
        self.Nexus_num = 1

        self.production_building_list.append(P.Nexus())
コード例 #3
0
 def build_from_nexus(self, unit):
     for b in self.production_building_list:
         if type(b) == type(P.Nexus()):
             b.queue.enqueue(unit)