Skip to content

Commit ea28c46

Browse files
author
Mark Charlton
committed
fix stupid typo bug
1 parent e97c00c commit ea28c46

File tree

9 files changed

+3213
-5
lines changed

9 files changed

+3213
-5
lines changed

.history/Assessment/Wk8/destroyer_20230322013327.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013355.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013503.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013504.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013509.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013519.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013748.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

.history/Assessment/Wk8/destroyer_20230322013853.py

Lines changed: 401 additions & 0 deletions
Large diffs are not rendered by default.

Assessment/Wk8/destroyer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# single ship battleship game.
22

33
## DEBUG FLAG
4-
f_debug = 0
4+
f_debug = 2
55

66
import pprint as pp
77
import random as r
@@ -217,7 +217,7 @@ def find_space(length):
217217
#/// I can write it a few other ways, but thought I'd keep this one, its a bit overly complex but works.
218218
def swap_direction(direction):
219219
# Create a dictionary to map the values to their translated values
220-
translation_dict = dict([('N', 'S'),('S', 'N'), ('E', 'E'), ('W', 'E')])
220+
translation_dict = dict([('N', 'S'),('S', 'N'), ('E', 'W'), ('W', 'E')])
221221
direction = direction.upper()
222222

223223
# Swap the direction if it exists in the translation dictionary
@@ -373,10 +373,10 @@ def check_exit():
373373
a = input ("Press ENTER to continue: ")
374374

375375
# on automatic you need to create the ships to place
376-
if s_game_type == "A":
377-
create_ships ( )
378-
else:
376+
if s_game_type == "S":
379377
place_ships ( )
378+
else:
379+
create_ships ( )
380380

381381
num_placed_ships = len(ships)
382382

0 commit comments

Comments
 (0)