Skip to content

Commit c10e5a0

Browse files
arturos-inaitCDaffyJr
authored andcommitted
more updates
1 parent 891e43e commit c10e5a0

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

torpydo/battleship.py

+13-12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import colorama
44
import platform
55

6+
from typing import List, Tuple
67
from colorama import Fore, Style
78
from torpydo.ship import Color, Letter, Position, Ship
89
from torpydo.game_controller import GameController
@@ -166,7 +167,7 @@ def initialize_myFleet():
166167

167168
myFleet = GameController.initialize_ships()
168169

169-
quick_and_dirty = True
170+
quick_and_dirty = False
170171
if quick_and_dirty:
171172
myFleet[0].positions.append(Position(Letter.B, 4))
172173
myFleet[0].positions.append(Position(Letter.B, 5))
@@ -197,17 +198,17 @@ def initialize_myFleet():
197198
print()
198199
print(f"Please enter the positions for the {ship.name} (size: {ship.size})")
199200

200-
i = 0
201-
while i < ship.size:
202-
try:
203-
position_input = check_position_input(f"Enter position {i+1} of {ship.size} (i.e A3):")
204-
except Exception:
205-
print(BAD_POSITION_INPUT_MSG)
206-
continue
207-
else:
208-
ship.add_position(position_input)
209-
i += 1
210-
TelemetryClient.trackEvent('Player_PlaceShipPosition', {'custom_dimensions': {'Position': position_input, 'Ship': ship.name, 'PositionInShip': i}})
201+
i = 0
202+
while i < ship.size:
203+
try:
204+
position_input = check_position_input(f"Enter position {i+1} of {ship.size} (i.e A3):")
205+
except Exception:
206+
print(BAD_POSITION_INPUT_MSG)
207+
continue
208+
else:
209+
ship.add_position(position_input)
210+
i += 1
211+
TelemetryClient.trackEvent('Player_PlaceShipPosition', {'custom_dimensions': {'Position': position_input, 'Ship': ship.name, 'PositionInShip': i}})
211212

212213

213214
def overlaps(positions, fleet:List[Ship]):

0 commit comments

Comments
 (0)