Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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_fieldmethod for visualizing the game board. - The
_validate_fieldmethod 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
app/main.py
Outdated
| self.start = start | ||
| self.end = end |
There was a problem hiding this comment.
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.'
| def __init__( | ||
| self, | ||
| ships: list[tuple[tuple[int, int], tuple[int, int]]] | ||
| ) -> None: |
There was a problem hiding this comment.
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.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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! ✨
No description provided.