canalun / brick-break-anywhere

let's break bricks anywhere!
66 stars 3 forks source link

Fix: debug mode also shouldn't start multiple times + Refactor #7

Closed igrep closed 6 months ago

igrep commented 6 months ago

Merge if you like!

  1. Before this change, the debug mode starts even after all blocks are removed. I think both the standard mode and debug mode are treated as same. Then I abstract them.
    • NOTE: Remove judging if NODE_ENV === "development" because I think hiding the "debug mode" button is sufficient.
  2. Refactor: It's confusing that dragAndMoveBall calls main. I couldn't figure out from the name