From a982632b1cc3218d74acec2b5f6a69ffc5e97ead Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 31 Aug 2016 14:58:23 -0400 Subject: Cleaned up code and improved website layout. --- js/magnets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/magnets.js') diff --git a/js/magnets.js b/js/magnets.js index 7d82507..c532e74 100644 --- a/js/magnets.js +++ b/js/magnets.js @@ -65,7 +65,7 @@ function draw() safe_zone_radius *= 0.9995; ellipse(mouseX, mouseY, safe_zone_radius, safe_zone_radius); - if ((mouseX > width || mouseY > height) && magnets.length > 0) + if ((mouseX > width || mouseY > height || mouseY < 0) && magnets.length > 0) { gameOver = true; alert("You went out of bounds. Score: " + magnets.length); -- cgit v1.2.3