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

Develop #465

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

Develop #465

wants to merge 3 commits into from

Conversation

hhorhe
Copy link

@hhorhe hhorhe commented Jul 28, 2024

No description provided.

app/main.py Outdated
deck = self.get_deck(row, column)
if deck:
deck.is_alive = False
if all(not d.is_alive for d in self.decks):
Copy link

Choose a reason for hiding this comment

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

d bad variable name

app/main.py Outdated
Comment on lines 16 to 21
if start[0] == end[0]: # horizontal ship
for col in range(start[1], end[1] + 1):
self.decks.append(Deck(start[0], col))
elif start[1] == end[1]: # vertical ship
for row in range(start[0], end[0] + 1):
self.decks.append(Deck(row, start[1]))
Copy link

Choose a reason for hiding this comment

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

better move this to separate method and call this method here

app/main.py Outdated
for deck in self.decks:
if deck.row == row and deck.column == column:
return deck
return None
Copy link

Choose a reason for hiding this comment

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

this line redundant here

@hhorhe hhorhe requested a review from vsmutok July 28, 2024 18:20
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.

Looks Good!

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