def verify_playername(self, arg):
        """Get the name of the player self.world.logging in. If the player exists, grab their
        data and verify their password. Otherwise, start the character creation
        process.
        
        PREV STATE: self.intro
        NEXT STATE: self.verify_password, if the player self.world.logging in exists, OR
                    self.verify_new_character if the player self.world.logging in is new
        """
        playername = arg
        if playername:
            if playername.lower() == 'new':
                self.next_state = self.new_playername
                self.player.update_output(['Please choose a name. It should be a single word, using only letters.', 'Name: '])
            else:
                self.playername = playername
                row = self.world.db.select('password,dbid FROM player WHERE name=?', [self.playername])
                if row:
                    # Awesome, a player with this name does exist! Let's check their password!
                    self.password = row[0]['password']
                    self.dbid = row[0]['dbid']
                    # self.state = self.verify_password
                    self.player.update_output("Enter password: " + CONCEAL)
                    self.next_state = self.verify_password
                else:
                    # The player entered a name that doesn't exist.. they should create
                    # a new character or try entering the name again.
                    self.player.update_output(['That player doesn\'t exist. Would you like to create a new character by the name of %s?' % self.playername,
                                               '(Yes/No): '])
                    self.next_state = self.verify_new_character
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/modes/init_mode.py/InitMode.verify_playername/original