@@ -16,7 +16,7 @@ def main():
16
16
if platform .system () == 'Windows' :
17
17
colorama .init (convert = True )
18
18
19
- print (Fore .WHITE )
19
+ print (Fore .LIGHTWHITE_EX )
20
20
log ("App starting up..." )
21
21
22
22
show_header ()
@@ -30,17 +30,17 @@ def main():
30
30
log ("Game over." )
31
31
except json .decoder .JSONDecodeError as je :
32
32
print ()
33
- print (Fore .LIGHTRED_EX + "ERROR: The file rolls.json is invalid JSON." + Fore .WHITE )
34
- print (Fore .LIGHTRED_EX + f"ERROR: { je } " + Fore .WHITE )
33
+ print (Fore .LIGHTRED_EX + "ERROR: The file rolls.json is invalid JSON." + Fore .LIGHTWHITE_EX )
34
+ print (Fore .LIGHTRED_EX + f"ERROR: { je } " + Fore .LIGHTWHITE_EX )
35
35
except FileNotFoundError as fe :
36
36
print ()
37
- print (Fore .LIGHTRED_EX + "ERROR: Rolls file not found" + Fore .WHITE )
38
- print (Fore .LIGHTRED_EX + f"ERROR: { fe } " + Fore .WHITE )
37
+ print (Fore .LIGHTRED_EX + "ERROR: Rolls file not found" + Fore .LIGHTWHITE_EX )
38
+ print (Fore .LIGHTRED_EX + f"ERROR: { fe } " + Fore .LIGHTWHITE_EX )
39
39
except KeyboardInterrupt :
40
40
print ()
41
- print (Fore .LIGHTCYAN_EX + "You gotta run? Ok, cya next time!" + Fore .WHITE )
41
+ print (Fore .LIGHTCYAN_EX + "You gotta run? Ok, cya next time!" + Fore .LIGHTWHITE_EX )
42
42
except Exception as x :
43
- print (Fore .LIGHTRED_EX + f"Unknown error: { x } " + Fore .WHITE )
43
+ print (Fore .LIGHTRED_EX + f"Unknown error: { x } " + Fore .LIGHTWHITE_EX )
44
44
45
45
46
46
def show_header ():
@@ -49,7 +49,7 @@ def show_header():
49
49
print (" Rock Paper Scissors" )
50
50
print (" Error Handling Edition" )
51
51
print ("---------------------------" )
52
- print (Fore .WHITE )
52
+ print (Fore .LIGHTWHITE_EX )
53
53
54
54
55
55
def show_leaderboard ():
@@ -86,13 +86,13 @@ def play_game(player_1, player_2):
86
86
87
87
if not roll1 :
88
88
print (Fore .LIGHTRED_EX + "Try again!" )
89
- print (Fore .WHITE )
89
+ print (Fore .LIGHTWHITE_EX )
90
90
continue
91
91
92
92
log (f"Round: { player_1 } roll { roll1 } and { player_2 } rolls { roll2 } " )
93
93
print (Fore .YELLOW + f"{ player_1 } rolls { roll1 } " )
94
94
print (Fore .LIGHTBLUE_EX + f"{ player_2 } rolls { roll2 } " )
95
- print (Fore .WHITE )
95
+ print (Fore .LIGHTWHITE_EX )
96
96
97
97
winner = check_for_winning_throw (player_1 , player_2 , roll1 , roll2 )
98
98
@@ -103,7 +103,7 @@ def play_game(player_1, player_2):
103
103
else :
104
104
msg = f'{ winner } takes the round!'
105
105
fore = Fore .GREEN if winner == player_1 else Fore .LIGHTRED_EX
106
- print (fore + msg + Fore .WHITE )
106
+ print (fore + msg + Fore .LIGHTWHITE_EX )
107
107
log (msg )
108
108
wins [winner ] += 1
109
109
@@ -115,7 +115,7 @@ def play_game(player_1, player_2):
115
115
overall_winner = find_winner (wins , wins .keys ())
116
116
fore = Fore .GREEN if overall_winner == player_1 else Fore .LIGHTRED_EX
117
117
msg = f"{ overall_winner } wins the game!"
118
- print (fore + msg + Fore .WHITE )
118
+ print (fore + msg + Fore .LIGHTWHITE_EX )
119
119
log (msg )
120
120
record_win (overall_winner )
121
121
@@ -162,7 +162,7 @@ def get_roll(player_name, roll_names):
162
162
163
163
return roll_names [selected_index ]
164
164
except ValueError as ve :
165
- print (Fore .RED + f"Could not convert to integer: { ve } " + Fore .WHITE )
165
+ print (Fore .RED + f"Could not convert to integer: { ve } " + Fore .LIGHTWHITE_EX )
166
166
return None
167
167
168
168
0 commit comments