diff --git a/avocado.py b/avocado.py index 3ec49ac..3930bd3 100644 --- a/avocado.py +++ b/avocado.py @@ -65,7 +65,8 @@ class Avocado: return True, self.rect.center else: self.clickFail.play() - return False, (0, 0) + return False, (0, 0) + return None, (0, 0) # BUG - isHit is called 4 times upon click which makes it return the # first time but fail the consecutive times #else: diff --git a/game.py b/game.py index 6af1237..137c357 100755 --- a/game.py +++ b/game.py @@ -258,12 +258,14 @@ class TheGame: # Check if any avocados have been hit for avo in self.movingAvocados: hit, center = avo.isHit(mousepos) + if hit is None: + continue if hit: score += 100 newPin.throwAt(center) color = self.chooseRandomColor() crystalBall.setColor(color) - elif hit == False: + else: score -= 50 # Had enough of this?