3
3
import colorama
4
4
import platform
5
5
6
- from colorama import Fore , Back , Style
6
+ from colorama import Fore , Style
7
7
from torpydo .ship import Color , Letter , Position , Ship
8
8
from torpydo .game_controller import GameController
9
9
from torpydo .telemetryclient import TelemetryClient
@@ -91,9 +91,6 @@ def start_game():
91
91
start_colouring (right_colour (is_hit ))
92
92
print ("Yeah ! Nice hit !" if is_hit else "Miss" )
93
93
TelemetryClient .trackEvent ('Player_ShootPosition' , {'custom_dimensions' : {'Position' : str (position ), 'IsHit' : is_hit }})
94
- if is_fleet_down (enemyFleet ):
95
- print ("Congratulations! You are the winner \o/" )
96
- break
97
94
98
95
print ( r'''
99
96
\ . ./
@@ -106,6 +103,11 @@ def start_game():
106
103
\ \ / /''' )
107
104
108
105
end_colouring ()
106
+ if is_fleet_down (enemyFleet ):
107
+ start_colouring (Fore .MAGENTA )
108
+ print ("Congratulations! You are the winner \o/" )
109
+ end_colouring ()
110
+ break
109
111
110
112
print ("\n \n Computer is thinking..." )
111
113
time .sleep (3 )
@@ -128,7 +130,9 @@ def start_game():
128
130
\ \ / /''' )
129
131
end_colouring ()
130
132
if is_fleet_down (myFleet ):
133
+ start_colouring (Fore .LIGHTRED_EX )
131
134
print ("Sorry, you lost..." )
135
+ end_colouring ()
132
136
break
133
137
134
138
print ("Thank you for playing!" )
0 commit comments