diff --git a/index.js b/index.js index b4c02be..d5591e7 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ var started = false; var level = 0; // game initiator -$(document).keypress(function() { +$(".startbtn").click(function() { if (!started) { $("#level-title").text("Level " + level); @@ -18,6 +18,8 @@ $(document).keypress(function() { started = true; } }); + + // button click $(".btn").click(function() { @@ -94,4 +96,4 @@ function startOver(){ level = 0; gamePattern = []; started = false; -} \ No newline at end of file +}