-
Notifications
You must be signed in to change notification settings - Fork 605
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
base: master
Are you sure you want to change the base?
Solution #351
Conversation
app/main.py
Outdated
ship.fire(*location) | ||
if ship.is_drowned: | ||
return "Sunk!" | ||
else: |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job 👍
No description provided.