mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 02:14:11 -05:00
fix(curriculum): improve description and instructions of Step 78 of Platformer game (#53577)
This commit is contained in:
committed by
GitHub
parent
e1f61075ae
commit
f7629df53d
@@ -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*;?/);
|
||||
|
||||
Reference in New Issue
Block a user