Learn Intermediate OOP by Building a Platformer Game - isCheckpointDetectionActive

Tell us what’s happening:

I don’t have any problem with this question. But I don’t understand, how does isCheckpointDetectionActive work. It defaults to true and when right or left key is pressed the platforms move. Now it isn’t changed anywhere right now is it? So the platforms should move always when the player moves. They move only when at the corner of the screen. I suppose it’s to show the checkpoint message and nothing should move when that happens, but why do the platforms move only when player is on the corner?

Your code so far

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

/* file: styles.css */

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



// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 81