Skip to content

Commit 4832c07

Browse files
committed
Wrote handle_signup docstrings
1 parent a2e454b commit 4832c07

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Application/Casino/Casino.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ def print_welcome(self) -> None:
8282
""")
8383

8484
def handle_login(self) -> UserAccount | None:
85+
"""
86+
Prompts the user to log in by entering their username and password.
87+
Allows up to 5 attempts before returning to the main screen.
88+
89+
:return: UserAccount if credentials are valid, otherwise None.
90+
"""
8591
for i in range(0, 5):
8692

8793
username: str = self.console.get_string_input("Enter your username", return_in_lower=False)
@@ -98,6 +104,12 @@ def handle_login(self) -> UserAccount | None:
98104
return None
99105

100106
def handle_signup(self) -> UserAccount | None:
107+
"""
108+
Guides the user through the sign-up process including entering a username, password, email,
109+
and answering two security questions. If the username already exists, the user is prompted to try again.
110+
111+
:return: The created UserAccount, or None if the username is taken.
112+
"""
101113

102114
while True:
103115
username: str = self.prompt_username()

0 commit comments

Comments
 (0)