fix(curriculum): allow parentheses in math expression (#55945)
parent
ed1152fcb2
commit
4014a9fb72
|
@ -14,7 +14,7 @@ Below that boolean expression, add another boolean expression that checks if the
|
|||
You should have a boolean expression that checks if the player's `x` position is greater than or equal to the platform's `x` position minus half of the player's width.
|
||||
|
||||
```js
|
||||
assert.match(code, /const\s+collisionDetectionRules\s*=\s*\[\s*player\.position\.y\s*\+\s*player\.height\s*<=\s*platform\.position\.y\s*,\s*player\.position\.y\s*\+\s*player\.height\s*\+\s*player\.velocity\.y\s*>=\s*platform\.position\.y\s*,\s*player\.position\.x\s*>=\s*platform\.position\.x\s*-\s*player\.width\s*\/\s*2\s*,?\s*]\s*;?/);
|
||||
assert.match(code, /const\s+collisionDetectionRules\s*=\s*\[\s*player\.position\.y\s*\+\s*player\.height\s*<=\s*platform\.position\.y\s*,\s*player\.position\.y\s*\+\s*player\.height\s*\+\s*player\.velocity\.y\s*>=\s*platform\.position\.y\s*,\s*player\.position\.x\s*>=\s*platform\.position\.x\s*-\s*\(?player\.width\s*\/\s*2\)?\s*,?\s*]\s*;?/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
|
Loading…
Reference in New Issue