-
Notifications
You must be signed in to change notification settings - Fork 1
/
old_main.py
66 lines (44 loc) · 1.84 KB
/
old_main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from dice import *
dice_type = 0
while True:
print('\033[1;31mDICE SIMULATOR\033[m')
print("Welcome to the best dice simulator you've ever seen!\n")
again = 'Y'
print('1 - Press "A" for the \033[1;32mFREE-DICE\033[m game-mode.')
print('2 - Press "B" for the \033[1;32mDUAL-D6\033[m game-mode.')
print('3 - Press "C" for the \033[1;32mPERCENTAGE\033[m game-mode.')
print('4 - Or press "X" for quit')
game_mode = input(f'Choose your game-mode [A, B, C or X]: ')
while game_mode.upper() == 'A':
print('\nChoose a dice (D4, D6, D8, D10, D12, D14, D16, D18 or D20.)\n')
dice_type = int(input('Which kind of dice you want to roll? '))
free_dice(dice_type)
again = input('Play again? [Y/N] ')
if again.upper() == 'N':
break
elif again.upper() != 'N' and again.upper() != 'Y':
print('\033[1;31mERROR\033[m')
print('You can only type "Y" for yes or "N" for not')
while game_mode.upper() == 'B':
dual_d6()
again = input('Play again? [Y/N] ')
if again.upper() == 'N':
break
elif again.upper() != 'N' and again.upper() != 'Y':
print('\033[1;31mERROR\033[m')
print('You can only type "Y" for yes or "N" for not')
while game_mode.upper() == 'C':
percent()
again = input('Play again? [Y/N] ')
if again.upper() == 'N':
break
elif again.upper() != 'N' and again.upper() != 'Y':
print('\033[1;31mERROR\033[m')
print('You can only type "Y" for yes or "N" for not')
if game_mode.upper() == 'X':
break
elif game_mode.upper() not in 'ABX':
print('\033[1;31mERROR\033[m')
print('You can only type "A", "B" or "X"')
sleeping('Closing')
print('\033[1;31mTHE END.\033[m')