diff --git a/pipe.js b/pipe.js index f67f086..430f87b 100644 --- a/pipe.js +++ b/pipe.js @@ -22,10 +22,10 @@ class Pipe { hits(bird) { let halfBirdHeight = bird.height / 2; - let halfBirdwidth = bird.width / 2; + let halfBirdWidth = bird.width / 2; if (bird.y - halfBirdHeight < this.top || bird.y + halfBirdHeight > this.bottom) { //if this.w is huge, then we need different collision model - if (bird.x + halfBirdwidth > this.x && bird.x - halfBirdwidth < this.x + this.w) { + if (bird.x + halfBirdWidth > this.x && bird.x - halfBirdWidth < this.x + this.w) { this.highlight = true; this.passed = true; return true;