-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathappmenu.py
37 lines (31 loc) · 966 Bytes
/
appmenu.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
#!/usr/bin/python
import os
import diceroller
import showtotals
class AppMenu(object) :
def start(self) :
os.system('clear')
menuOption = -1
diceRoller = diceroller.DiceRoller()
showTotals = showtotals.ShowTotals()
while menuOption != 0 :
print '\n' + '=' * 29
print "Welcome to Super Awesome Dice"
print '=' * 29
print """
Please make your selection:\n
1.) Roll Dice
2.) Show Totals
0.) Exit Program
"""
menuOption = raw_input("> ")
menuOption = int(menuOption)
if menuOption == 1 :
diceRoller.rollDice()
elif menuOption == 2 :
showTotals.getResults()
elif menuOption == 0 :
print "Exiting program...\n"
break
else :
print "Please make a valid selection"