fix(curriculum): allow changing order of multiplication factors in RPG - Step 128 (#53279)

This commit is contained in:
Huyen Nguyen
2024-01-22 00:28:59 +07:00
committed by GitHub
parent 9d4f3ef125
commit 9ed708d769

View File

@@ -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--