From f9e9c9a6ab77eda9f7cbb8ee11933567bd3e07a8 Mon Sep 17 00:00:00 2001 From: a2937 Date: Thu, 11 Jan 2024 19:32:38 -0500 Subject: [PATCH] fix(curriculum): allow multiple solutions oop game 73 (#53117) --- .../64c764dd9071050d0a2c1473.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c764dd9071050d0a2c1473.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c764dd9071050d0a2c1473.md index 93df76a8947..4f421362958 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c764dd9071050d0a2c1473.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c764dd9071050d0a2c1473.md @@ -18,19 +18,19 @@ Inside the callback function, add a `platform` parameter and for the body of the You should have a `forEach` loop that iterates through the `platforms` array. ```js -assert.match(code, /platforms\.forEach\(\s*(\(.*\)|[^\s()]+)\s*=>\s*{\s*(.*?)\s*}\s*\);?/); +assert.match(code, /platforms\.forEach\(\s*(\(.*\)|[^\s()]+)\s*=>\s*{?\s*(.*?)\s*}?\s*\);?/); ``` You should add a `platform` parameter to the callback function. ```js -assert.match(code, /platforms\.forEach\(\s*(\(\s*platform\s*\)|platform)\s*=>\s*{\s*(.*?)\s*}\s*\);?/); +assert.match(code, /platforms\.forEach\(\s*(\(\s*platform\s*\)|platform)\s*=>\s*{?\s*(.*?)\s*}?\s*\);?/); ``` You should call the `draw` method on each `platform`. ```js -assert.match(code, /platforms\.forEach\(\s*(\(\s*platform\s*\)|platform)\s*=>\s*{\s*platform\.draw\(\)\s*;?\s*}\s*\);?/); +assert.match(code, /platforms\.forEach\(\s*(\(\s*platform\s*\)|platform)\s*=>\s*{?\s*platform\.draw\(\)\s*;?\s*}?\s*\);?/); ``` # --seed--