mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-25 10:01:30 -04:00
fix(curriculum): allow changing order of multiplication factors in RPG - Step 128 (#53279)
This commit is contained in:
@@ -22,13 +22,13 @@ assert.match(defeatMonster.toString(), /gold\s*\+=/);
|
||||
You should use `Math.floor()` to round the result of the monster's level times `6.7`.
|
||||
|
||||
```js
|
||||
assert.match(defeatMonster.toString(), /Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\)/);
|
||||
assert.match(defeatMonster.toString(), /(Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\))|(Math\.floor\(\s*6\.7\s*\*\s*monsters\[fighting\]\.level\s*\))/);
|
||||
```
|
||||
|
||||
You should add the result of `Math.floor(monsters[fighting].level * 6.7)` to `gold`.
|
||||
|
||||
```js
|
||||
assert.match(defeatMonster.toString(), /gold\s*\+=\s*Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\)/);
|
||||
assert.match(defeatMonster.toString(), /gold\s*\+=\s*(Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\))|(Math\.floor\(\s*6\.7\s*\*\s*monsters\[fighting\]\.level\s*\))/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user