def add_email(self, arg):
        if arg.lower() == 'y' or arg.lower() == 'yes':
            self.save['email'] = 'yes_email'
            self.player.update_output('We promise not to use your e-mail for evil!')
            self.player.update_output('Please enter your e-mail address: ')
        # We should only get to this state if the player said they want to enter their e-mail
        # address to be saved
        elif self.save.get('email') == 'yes_email':
            self.save['email'] = arg
            self.player.playerize(self.save)
            self.player.save()
            self.state = self.character_cleanup
        elif arg.lower() == 'n' or arg.lower() == 'no':
            self.player.playerize(self.save)
            self.player.save()
            self.state = self.character_cleanup
        else:
            self.player.update_output('Please enter yes or no: ')
            
    
    # def assign_defaults(self):
    #     if len(self.player.inq) > 0:
    #         if len(self.player.inq[0]) > 0 and self.player.inq[0][0].lower() in 'ctfw':
    #             self.player.playerize(self.save)
    #             if self.player.inq[0][0].lower() == 'c':
    #                 # Custom stats creation
    #                 self.state = self.custom_create
    #                 self.custom_points = {'left':8, 'STR':0, 'INT':0, 'DEX':0, 'SPD':0, 'HP':0, 'MP':0}
    #                 self.display_custom_create()
    #                 del self.player.inq[0]
    #                 return
    #             elif self.player.inq[0][0].lower() == 't':
    #                 # Set Thief defaults
    #                 self.player.strength = 1
    #                 self.player.dexterity = 3
    #                 self.player.intelligence = 1
    #                 self.player.speed = 3
    #                 self.player.max_hp = 20
    #                 self.player.max_mp = 0
    #                 self.player.hp = self.player.max_hp
    #                 self.player.mp = self.player.max_mp
    #             elif self.player.inq[0][0].lower() == 'f':
    #                 # Set Fighter defaults
    #                 self.player.strength = 3
    #                 self.player.dexterity = 1                
    #                 self.player.intelligence = 0
    #                 self.player.speed = 1
    #                 self.player.max_hp = 35
    #                 self.player.max_mp = 0
    #                 self.player.hp = self.player.max_hp
    #                 self.player.mp = self.player.max_mp
    #             elif self.player.inq[0][0].lower() == 'w':
    #                 # Set wizard defaults
    #                 self.player.strength = 1
    #                 self.player.dexterity = 1                
    #                 self.player.intelligence = 3
    #                 self.player.speed = 0
    #                 self.player.max_hp = 20
    #                 self.player.max_mp = 9
    #                 self.player.hp = self.player.max_hp
    #                 self.player.mp = self.player.max_mp
    #             self.state = self.character_cleanup
    #             self.player.dbid = self.world.db.insert_from_dict('player', self.player.to_dict())
    #         else:
    #             # player's input didn't make any sense
    #             del self.player.inq[0]
    #             self.player.update_output("I don't understand." + choose_class_string)
    # 
    # def display_custom_create(self):
    #     header = []
    #     header.append("You have %s points to spend:" % self.custom_points['left'])
    #     header.append("Ability:    Cost:    Effect:")
    #     for ability in ['STR', 'DEX', 'INT', 'SPD', 'HP', 'MP']:
    #         if ability == 'HP':
    #             base = 20
    #             delta = 5
    #         elif ability == 'MP':
    #             base = 0
    #             delta = 3
    #         else:
    #             base = 0
    #             delta = 1
    #         a = self.custom_points[ability]
    #         if a < 3:
    #             values = (ability," " * (14-len(ability)), '1', str(base + (a * delta)), str(base + ((a + 1) * delta)))
    #         else:
    #             values = (ability," " * (14-len(ability)), '*', str(base + (a * delta)), str(base + (a * delta)))
    #         header.append("%s%s%s      %s -> %s" % values)
    #     header.append('Choose an ability and how many points to add (up to three)')
    #     header.append('or negative numbers to remove points. Type "Done" when finished.')
    #     header.append("") # one more newline for easier to read input
    #     self.player.update_output('\n'.join(header))
    # 
    # def custom_create(self):
    #     if len(self.player.inq) > 0:
    #         m = re.match('(?P<attr>[a-zA-Z]+)[ ]*(?P<amount>-?\d+)?', self.player.inq[0])
    #         if m:
    #             attr, amount = m.group('attr', 'amount')
    #             if amount:
    #                 amount = int(amount)
    #             attr = attr.upper()
    #             if attr in self.custom_points:
    #                 new_val = self.custom_points[attr] + amount
    #                 new_balance = self.custom_points['left'] - amount
    #                 if new_val < 0 or new_val > 3 or new_balance < 0 or new_balance > 8:
    #                     self.player.update_output("You can't do that!\n")
    #                 else:
    #                     self.custom_points[attr] = new_val
    #                     self.custom_points['left'] = new_balance
    #             elif attr == 'DONE':
    #                 if self.custom_points['left'] > 0:
    #                     self.player.update_output('You still have points left to spend!')
    #                 else:
    #                     self.player.strength = self.custom_points['STR']
    #                     self.player.intelligence = self.custom_points['INT']
    #                     self.player.dexterity = self.custom_points['DEX']
    #                     self.player.speed = self.custom_points['SPD']
    #                     self.player.max_mp = 3 * int(self.custom_points['MP'])
    #                     self.player.mp = self.player.max_mp
    #                     self.player.max_hp = 20 + 5 * int(self.custom_points['HP'])
    #                     self.player.hp = self.player.max_hp
    #                     del self.player.inq[0]
    #                     self.state = self.character_cleanup
    #                     self.player.dbid = self.world.db.insert_from_dict('player', self.player.to_dict())
    #                     return
    #             else:
    #                 self.player.update_output("I don't understand.")
    #         else:
    #             self.player.update_output("I don't understand.")
    #         self.display_custom_create()
    #         del self.player.inq[0]
Parses an HTTP Accept-* header.  This does not implement a complete
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/modes/init_mode.py/InitMode.add_email--crossover with--dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/http.py/parse_accept_header