-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
22 lines (20 loc) · 773 Bytes
/
utils.py
File metadata and controls
22 lines (20 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from rich import print
from rich.prompt import Prompt
def post_level_menu(restart_callback, next_level_callback):
print("\n[bold cyan]What do you want to do next?[/bold cyan]")
print("[yellow]1.[/yellow] Restart Level")
print("[yellow]2.[/yellow] Continue to Next Level")
print("[yellow]3.[/yellow] Exit Game")
while True:
choice = Prompt.ask("[green]Enter choice (1/2/3)[/green]").strip()
if choice == "1":
restart_callback()
break
elif choice == "2":
next_level_callback()
break
elif choice == "3":
print("[red]Exiting game. Goodbye, Agent_47.[/red]")
exit()
else:
print("[red]Invalid choice. Please enter 1, 2, or 3.[/red]")