Move the action logic for the delete_account state from its
corresponding facet to the menu module, hiding it behind a
consistently-named entry point.
def choose_name_create_7(user):
"""Provide a randomly-generated name as choice 7."""
return mudpy.misc.random_name()
+
+
+def delete_account_action_y(user):
+ """Permanently delete the account and all avatars, as requested."""
+ return user.destroy()
unremarkable name forever.
menu.choose_name.prompt: "Choose a name for $(tpop):"
-menu.delete_account.action_y: user.destroy()
+menu.delete_account.action_y: mudpy.menu.delete_account_action_y(user)
menu.delete_account.branch_n: main_utility
menu.delete_account.branch_y: disconnecting
menu.delete_account.choice_n: no, don't delete my account