fix(curriculum): improve description and instructions of Step 78 of Platformer game (#53577)

This commit is contained in:
developwithabhinav
2024-02-07 00:50:56 -05:00
committed by GitHub
parent e1f61075ae
commit f7629df53d

View File

@@ -9,7 +9,7 @@ dashedName: step-78
Inside the callback function, create a new `const` variable called `collisionDetectionRules` and assign it an empty array.
Inside that array, add a boolean expression that checks if the player's `y` position plus the player's height is less than or equal to the platform's `y` position.
Inside that array, add a 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.
# --hints--
@@ -19,7 +19,7 @@ You should have a `const` variable called `collisionDetectionRules` that is assi
assert.match(code, /const\s+collisionDetectionRules\s*=\s*\[\s*(?:[^\]]*\s*)*\s*\]\s*;?/);
```
You should have a boolean expression that checks if the player's `y` position plus the player's height is less than or equal to the platform's `y` position.
You should have a 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.
```js
assert.match(code, /const\s+collisionDetectionRules\s*=\s*\[\s*player\.position\.y\s*\+\s*player\.height\s*<=\s*platform\.position\.y\s*,?\s*]\s*;?/);