def default(self, line): action_input = parse_translate(line) # print action_input action_parser(action_input, available_actions, player, room) # print 'default(%s)' % line return line
def play(): world.load_tiles() # pcs = npcs() player = Player() room = world.tile_exists(player.location_x, player.location_y) # print(room.tile_name()) # print vars(room) print room.room_name() print room.intro_text() while player.is_alive() and not player.victory: room = world.tile_exists(player.location_x, player.location_y) room.modify_player(player) # Check again since the room could have changed the player's state if player.is_alive() and not player.victory: # print("Choose an action:\n") available_actions = room.available_actions() room.exits_text() # print exits # for action in available_actions: # print(action) # print " " action_input = raw_input('\tWhat would you like to do? :') action_input = parse_translate(action_input) # print action_input action_parser(action_input, available_actions, player, room)
def default(self, line): action_input = parse_translate(line) if "npcschedule" in action_input: sched(action_input, available_actions, player, room) return if action_input != "ERROR": action_parser(action_input, available_actions, player, room) return line
def do_mytest(self, line): action_input = parse_translate(line) if action_input != "ERROR": action_parser(action_input, available_actions, player, room) return line
def default(self, line): action_input = parse_translate(line) if action_input != "ERROR": action_parser(action_input, available_actions, player, room) return line