Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Accessible in touch screens
  • Loading branch information
sabarish1827 authored Feb 8, 2024
1 parent 0446bf8 commit 1670d76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ var started = false;
var level = 0;

// game initiator
$(document).keypress(function() {
$(".startbtn").click(function() {
if (!started) {

$("#level-title").text("Level " + level);
nextSequence();
started = true;
}
});


// button click
$(".btn").click(function() {

Expand Down Expand Up @@ -94,4 +96,4 @@ function startOver(){
level = 0;
gamePattern = [];
started = false;
}
}

0 comments on commit 1670d76

Please sign in to comment.