33import colorama
44import platform
55
6- from colorama import Fore , Back , Style
6+ from colorama import Fore , Style
77from torpydo .ship import Color , Letter , Position , Ship
88from torpydo .game_controller import GameController
99from torpydo .telemetryclient import TelemetryClient
@@ -91,9 +91,6 @@ def start_game():
9191 start_colouring (right_colour (is_hit ))
9292 print ("Yeah ! Nice hit !" if is_hit else "Miss" )
9393 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
9794
9895 print ( r'''
9996 \ . ./
@@ -106,6 +103,11 @@ def start_game():
106103 \ \ / /''' )
107104
108105 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
109111
110112 print ("\n \n Computer is thinking..." )
111113 time .sleep (3 )
@@ -128,7 +130,9 @@ def start_game():
128130 \ \ / /''' )
129131 end_colouring ()
130132 if is_fleet_down (myFleet ):
133+ start_colouring (Fore .LIGHTRED_EX )
131134 print ("Sorry, you lost..." )
135+ end_colouring ()
132136 break
133137
134138 print ("Thank you for playing!" )
0 commit comments