- if parameters in actor.universe.contents[actor.get("location")].portals():
- actor.move_direction(parameters)
- else:
- actor.send("You cannot go that way.")
+ for portal in sorted(
+ actor.universe.contents[actor.get("location")].portals()):
+ if portal.startswith(parameters):
+ actor.move_direction(portal)
+ return(portal)
+ actor.send("You cannot go that way.")