Learn Intermediate OOP by Building a Platformer Game - Step 85

Tell us what’s happening:

pretty sure my code is correct. Yet it still says its incorrect. Idk why, can someone help?

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,
      player.position.y + player.height + player.velocity.y >= platform.position.y,
      player.position.x >= platform.position.x - player.width / 2,
      player.position.x <= platform.position.x + platform.width - (player.width / 3)
    ];
  });


// 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/129.0.0.0 Safari/537.36

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 85

Hello there @VitaminCpp13

Well, your code is correct but you don’t need the parenthesis. Remove that and try again! :stuck_out_tongue_winking_eye:

2 Likes

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