Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #351

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Molodoirockstar
Copy link

No description provided.

app/main.py Outdated
ship.fire(*location)
if ship.is_drowned:
return "Sunk!"
else:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove redundant else

app/main.py Outdated
pass
def __init__(self, ships: tuple[tuple[int]]) -> None:
self.ships = [Ship(ship[0], ship[1]) for ship in ships]
self.battlefield = [["~" for _ in range(10)] for _ in range(10)]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you need it?

if you want to implement the battlefield print method, put this logic in a separate method

Copy link

@vsmutok vsmutok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Job 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants