Skip to content

Commit

Permalink
🔨 refactor(obstacle.js): change the order of constructor parameters t…
Browse files Browse the repository at this point in the history
…o improve readability and maintainability
  • Loading branch information
romantech committed Jan 24, 2024
1 parent 81d0ee0 commit b262ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/obstacle.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ObstacleManager {
}

class Obstacle {
constructor({ defaultBottom = 50, className = 'obstacle', speed = 5 } = {}) {
constructor({ defaultBottom, speed, className = 'obstacle' } = {}) {
this.speed = speed;
this.point = 1;
this.frameId = null;
Expand Down

0 comments on commit b262ef0

Please sign in to comment.