-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.py
49 lines (43 loc) · 1.26 KB
/
menu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Python Libraries
import sys
# My libraries
import card
import game
class Menu:
def start():
print('''
======================================
Welcome to BINGO!
Select an option:
1 - Play Bingo
2 - Generate your Bingo Card
3 - Quit
======================================
''')
option = input('Please enter your choice here: ')
if option == '1':
print('Starting...\n')
# return "Number 1"
game.Game.start()
elif option == '2':
print('Generating card...\n')
print(card.Card.generate_card())
Menu.new_card()
elif option == '3':
print('Bye')
return sys.exit(0)
else:
print('Enter a valid command')
return Menu.start() #Restart the Menu Screen
def new_card():
answer = "Y"
while answer == "Y":
print("Generate new Bingo Card?")
answer = input("Y/N: ").upper()
if answer == "Y":
print(card.Card.generate_card())
elif answer == "N":
Menu.start()
else:
print("#!# Invalid answer. Try again #!#")
answer = "Y"