Skip to content

add task solution#1708

Open
Alternate001 wants to merge 5 commits intomate-academy:masterfrom
Alternate001:master
Open

add task solution#1708
Alternate001 wants to merge 5 commits intomate-academy:masterfrom
Alternate001:master

Conversation

@Alternate001
Copy link
Copy Markdown

Copy link
Copy Markdown

@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

Hello! While your code is well-structured, I am requesting changes because the automated tests are failing. The core functionality for moving the spider needs a couple of adjustments to meet all requirements.

The test logs show two main issues:

  1. Incorrect Positioning: The spider is not moving to the correct coordinates on click. This often happens because event.clientX and event.clientY provide coordinates relative to the viewport, not the parent 'wall' element. You'll need to adjust your calculations to be relative to the wall.
  2. Boundary Issues: The spider moves even when clicking outside the wall. To fix this, make sure your click event listener is attached directly to the wall element, not the document or body.

Please revisit your logic for calculating the spider's position and how the event listener is set up. Addressing these points should get the tests to pass. Keep up the great effort!


✨ 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

Copy link
Copy Markdown

@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 spider's movement and boundary checks! Your code is very close to complete. However, this requires a small change as the automated tests are failing. The tests reveal that the spider is not being centered correctly on the mouse click; instead, its top-left corner is aligned with the cursor.

To fix this, you'll need to adjust your position calculation. After getting the click coordinates, you should also get the spider's width and height. Then, subtract half of the spider's width from the left position and half of its height from the top position. This will correctly place the spider's center directly under the cursor and allow the tests to pass.


✨ 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

Copy link
Copy Markdown

@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

I am approving this submission as an educational override to support your learning journey — great job centering the spider on the cursor and implementing correct boundary checks in src/scripts/main.js! 🎉 The core functionality is solid and meets all task requirements. However, please remove the console.log() statements on lines 26–29, as they violate the no-console linting rule and prevent CI from passing. This is a common learning step — catching these early helps build production-ready habits. You're doing excellent work, and each iteration like this strengthens your coding discipline and attention to detail!


✨ 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

Copy link
Copy Markdown

@Denys-Kravchuk9988 Denys-Kravchuk9988 left a comment

Choose a reason for hiding this comment

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

The demo link seems to not be working now. Please, try to re-deploy the project and share demo link.

@Alternate001
Copy link
Copy Markdown
Author

Alternate001 commented Apr 13, 2026

@Denys-Kravchuk9988
Screenshot 2026-04-13 103213
I get an Error while trying to delpoy my project.

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.

3 participants