Learn Intermediate OOP by Building a Platformer Game - Step 82

Tell us what’s happening:

ITkeeps telling me I am wrong. Here is my answer so far
const collisionDetectionRules = [((player.position.y + player.height) >= platform.position.y)];

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region


  platforms.forEach((platform) => {
    const collisionDetectionRules = [((player.position.y + player.height) >= platform.position.y)];
    
  });


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 82

1 Like

It looks like a couple of issues.

The test doesn’t account for the extra parens you have here, so I would suggest removing them.

Also, you are using the wrong comparison operator here

here are the directions again
boolean expression that checks whether the player’s y position plus the player’s height is less than or equal to the platform’s y position.

once you fix those things, then the test will pass

1 Like

Thank you it has worked

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.