From 00a15076f5766e36048d40f81a7b6ea2881157be Mon Sep 17 00:00:00 2001 From: Eduardo Russo Date: Sun, 25 Dec 2022 07:10:46 +0000 Subject: [PATCH] Fixed halfBirdWidth camelcase --- pipe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;