Esempio n. 1
0
 def _doCommand(self, player):
     rm = player.room
     subj = Item.items[self.subject]
     if subj in player.inv:
         rm.addItem(subj)
         player.drop(subj)
     else:
         print "You don't have %s %s." % (util.aOrAn(subj), subj)
Esempio n. 2
0
 def finish(self):
     # XXX do a terminal write here
     print
     print "You ended the game with:"
     for item in self.player.inv:
         print " -", util.aOrAn(item), item
     log = registry.getLogger()
     log.msg("Game has ended.")