def execute(self):
        dir_map = {'n': 'north', 's': 'south', 'e': 'east', 'w': 'west',
                   'u': 'up', 'd': 'down'
                  }
        if self.alias == 'go':
            if not self.args:
                self.pc.update_output('Go in which direction?')
                return
            if self.args in dir_map:
                direction = dir_map[self.args]
            else:
                direction = self.args
        else:
            if self.alias in dir_map:
                direction = dir_map[self.alias]
            else:
                direction = self.alias
        
        if self.pc.location:
            go_exit = self.pc.location.exits.get(direction)
            if go_exit:
                if go_exit._closed:
                    self.pc.update_output('The door is closed.\n')
                else:
                    if go_exit.to_room:
                        if go_exit.linked_exit:
                            arrives = {'up': 'above', 'down': 'below', 'north': 'the north',
                                       'south': 'the south', 'east': 'the east', 'west': 'the west'}
                            tell_new = '%s arrives from %s.' % (self.pc.fancy_name(),
                                                                    arrives.get(go_exit.linked_exit))
                        else:
                            tell_new = '%s suddenly appears in the room.' % self.pc.fancy_name()
                        tell_old = '%s leaves %s.' % (self.pc.fancy_name(),
                                                             go_exit.direction)
                        self.pc.go(go_exit.to_room, tell_new, tell_old)
                    else:
                        # SOMETHING WENT BADLY WRONG IF WE GOT HERE!!!
                        # somehow the room that this exit pointed to got deleted without informing
                        # this exit.
                        self.world.log.critical('EXIT FAIL: Exit %s from room %s in area %s failed to resolve.' % (go_exit.direction, go_exit.room.id, go_exit.room.area.name))
                        # Delete this exit in the database and the room - we don't want it 
                        # popping up again
                        go_exit.destruct()
                        self.pc.location.exits[go_exit.direction] = None
                        # Tell the player to ignore the man behind the curtain
                        self.pc.location.tell_room('A disturbance was detected in the Matrix: Entity "%s exit" should not exist.\nThe anomaly has been repaired.\n' % self.args)
                        
            else:
                self.pc.update_output('You can\'t go that way.\n')
        else:
            self.pc.update_output('You exist in a void; there is nowhere to go.\n')
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/commands/commands.py/Go.execute/original