Skip to content

battlrship#671

Open
Lobanov-V wants to merge 2 commits intomate-academy:masterfrom
Lobanov-V:master
Open

battlrship#671
Lobanov-V wants to merge 2 commits intomate-academy:masterfrom
Lobanov-V:master

Conversation

@Lobanov-V
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Great job on implementing the core logic for the fire method! Your approach is solid. However, this submission requires changes because some key requirements from the task description are missing.

Specifically, you need to implement the "Extra tasks":

  • The print_field method for visualizing the game board.
  • The _validate_field method to check for valid ship configurations, and it should be called from __init__.

Additionally, in the Ship class, the self.start and self.end attributes are assigned but never used, which violates a project requirement. Please remove these unused attributes. [CHECKLIST ITEM #4]

Once these parts are added, your solution will be complete!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

app/main.py Outdated
Comment on lines +15 to +16
self.start = start
self.end = end

Choose a reason for hiding this comment

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

These attributes self.start and self.end are assigned but never used after the __init__ method completes. This violates checklist item #4: 'Remove unused attributes.'

Comment on lines +60 to +63
def __init__(
self,
ships: list[tuple[tuple[int, int], tuple[int, int]]]
) -> None:

Choose a reason for hiding this comment

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

The implementation is missing the extra tasks from the description. You need to implement the print_field method and the _validate_field method. The _validate_field method should be called from __init__ to validate the ship configuration.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Excellent work on this submission! You've successfully implemented all the required features, including the print_field and _validate_field methods, and addressed all the feedback from the previous review. The code is clean, well-structured, and correctly follows all project requirements. I am approving your solution, great job!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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