Exemplo n.º 1
0
    def message(self):
        s = 'Which do you mean, '
        l = []
        for word in self.words:
            l.append(word.word.definite)
        s += utils.naturalJoin(l, ', ', ' or ')
        s += '?'

        return s
Exemplo n.º 2
0
    def inv(self, output):
        '''Write object inventory on output.

		output : output'''
        l = []
        for item in self.inventory:
            if props.Mobile in item.props:
                l.append(item.Normal.getDesc('inv'))

        if len(l) == 0:
            l.append('nothing')
        output.write(self.responses[self.INVENTORY] %
                     utils.naturalJoin(l, ', ', ' and '))

        output.close()
Exemplo n.º 3
0
 def exitString(self):
     s = self.responses[self.SEE_EXITS] % utils.naturalJoin(
         self.exits.keys(), ', ', ' and ')
     return s