-
Notifications
You must be signed in to change notification settings - Fork 602
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
base: master
Are you sure you want to change the base?
Develop #465
Conversation
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): |
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.
d
bad variable name
app/main.py
Outdated
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])) |
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.
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 |
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.
this line redundant here
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.
Looks Good!
No description provided.