def looking_for_pub(self):
        '''Look for a pub that accepts me and my friends'''
        if self['pub'] != None:
            return self.sober_in_pub
        self.debug('I am looking for a pub')
        group = list(self.get_neighboring_agents())
        for pub in self.env.available_pubs():
            self.debug('We\'re trying to get into {}: total: {}'.format(pub, len(group)))
            if self.env.enter(pub, self, *group):
                self.info('We\'re all {} getting in {}!'.format(len(group), pub))
                return self.sober_in_pub
def looking_for_pub ( self ) : if self [ 'pub' ] != None : return self . sober_in_pub self . debug ( 'I am looking for a pub' ) group = list ( self . get_neighboring_agents ( ) ) for pub in self . env . available_pubs ( ) : self . debug ( 'We\'re trying to get into {}: total: {}' . format ( pub , len ( group ) ) ) if self . env . enter ( pub , self , * group ) : self . info ( 'We\'re all {} getting in {}!' . format ( len ( group ) , pub ) ) return self . sober_in_pub
Look for a pub that accepts me and my friends