mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-27 21:23:30 -08:00
Clean Code: Apply flake8-simplify to Python
Also flake8-comprehensions which was added to the CI For flake8-simplify, there are a few false-positives, e.g. https://github.com/MartinThoma/flake8-simplify/issues/115
This commit is contained in:
@@ -260,14 +260,13 @@ def short_range_scan():
|
||||
docked = False
|
||||
for i in (s1 - 1, s1, s1 + 1):
|
||||
for j in (s2 - 1, s2, s2 + 1):
|
||||
if 0 <= i <= 7 and 0 <= j <= 7:
|
||||
if compare_marker(i, j, ">!<"):
|
||||
docked = True
|
||||
cs = "DOCKED"
|
||||
e, p = e0, p0
|
||||
print("SHIELDS DROPPED FOR DOCKING PURPOSES")
|
||||
s = 0
|
||||
break
|
||||
if 0 <= i <= 7 and 0 <= j <= 7 and compare_marker(i, j, ">!<"):
|
||||
docked = True
|
||||
cs = "DOCKED"
|
||||
e, p = e0, p0
|
||||
print("SHIELDS DROPPED FOR DOCKING PURPOSES")
|
||||
s = 0
|
||||
break
|
||||
else:
|
||||
continue
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user