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)
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.")