You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb2e5bdfb23a67272a07c7.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ dashedName: step-98
9
9
10
10
Now you need to create a `draw` method for the `CheckPoint` class.
11
11
12
-
Inside the `draw` method, add a`fillStyle` property to the `ctx` object and set it to`"#f1be32"`.
12
+
Inside the `draw` method, assign the`fillStyle` property on the `ctx` object the hex color`"#f1be32"`.
13
13
14
14
Below the `fillStyle` property, use the `fillRect` method on the `ctx` object and pass in the `x`, `y`, `width`, and `height` properties as arguments.
15
15
@@ -18,35 +18,35 @@ Below the `fillStyle` property, use the `fillRect` method on the `ctx` object an
18
18
Your `CheckPoint` class should have a `draw` method.
Your `draw` method should invoke the `fillRect` method on the `ctx` object.
40
40
41
41
```js
42
-
constsplitter=code.split('#f1be32')
42
+
constsplitter=code.split('#f1be32');
43
43
assert.match(splitter[1],/ctx\.fillRect\(/);
44
44
```
45
45
46
-
When invoking `ctx.fillRect` you should pass in the `x`, `y`, `width`, and `height` properties as arguments. Don't forget the `this` keyword.
46
+
When invoking `ctx.fillRect` you should pass in the `position.x`, `position.y`, `width`, and `height` properties as arguments. Don't forget the `this` keyword.
0 commit comments