Пример #1
0
    def init(self):
        controllers = []
        channels = self.channelsStorage.getChannelsByCriteria(find_criteria.BWBattleChannelFindCriteria())
        squad = self.channelsStorage.getChannelByCriteria(find_criteria.BWPrbChannelFindCriteria(PREBATTLE_TYPE.SQUAD))
        if squad is not None:
            channels.append(squad)
        for channel in channels:
            controller = self.factory(channel)
            if controller is not None:
                controllers.append(controller)

        return controllers
 def __removeBattleChannels(self):
     channels = self.channelsStorage.getChannelsByCriteria(
         find_criteria.BWBattleChannelFindCriteria())
     for channel in channels:
         self.channelsStorage.removeChannel(channel)