'Refactored by Sourcery'

This commit is contained in:
Sourcery AI
2023-05-24 23:55:27 +00:00
committed by amjad
parent 7c1e336f14
commit 71d02673a9
70 changed files with 582 additions and 835 deletions

View File

@@ -40,8 +40,8 @@ def place_ship(sea: SeaType, size: int, code: int) -> None:
point = add_vector(point, vector)
points.append(point)
if not all([is_within_sea(point, sea) for point in points]) or any(
[value_at(point, sea) for point in points]
if not all(is_within_sea(point, sea) for point in points) or any(
value_at(point, sea) for point in points
):
# ship out of bounds or crosses other ship, trying again
continue