diff --git a/app.js b/app.js index fa96ec8..2fcfc02 100644 --- a/app.js +++ b/app.js @@ -52,7 +52,9 @@ document.addEventListener('DOMContentLoaded', function() { scoreValue.innerText = score; - }); + }); if (score == -20 ){ + alert("you lost the game ");location.reload(); + } }, 500); @@ -72,4 +74,4 @@ document.addEventListener('DOMContentLoaded', function() { }); -}) \ No newline at end of file +}) diff --git a/homescreen.png b/homescreen.png new file mode 100644 index 0000000..46b62ef Binary files /dev/null and b/homescreen.png differ diff --git a/readme.md b/readme.md index a2a3459..52ef89d 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,23 @@ +# 🧟‍♂️ Zombie Game + + Simple "game" created with HTML, CSS and JS. Animation was created using following sprite: ![Zombie](http://www.wdrfree.com/public/demos/animatespritekeyframes/walkingdead.png) Use your mouse and "shoot" the zombie - you have to hit one twice to delete it from the screen. - # Live Preview + # ▶ Live Preview +Click On Image To Play Live Game Or Click On Game + +[![CarDEalerShip](https://raw.githubusercontent.com/ashishsiot/Zombie-Game-JS/master/homescreen.png)](https://ashishsiot.github.io/Zombie-Game-JS/) + + +[Click Here](https://ashishsiot.github.io/Zombie-Game-JS/) + + +# 🛠 Build Using -You can view the game by following this link: https://8bit-peter.github.io/Zombie-Game-JS/ +* HTML +* JAVASCRIPT +* CSS