Skip to content

Instantly share code, notes, and snippets.

@shrutis22
Created January 15, 2016 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shrutis22/21015fd67fc57ace11a9 to your computer and use it in GitHub Desktop.
Save shrutis22/21015fd67fc57ace11a9 to your computer and use it in GitHub Desktop.
Start Game - Brick Game
function startCollisionChecker() {
intervalId = setInterval(checkCollision, 100);
}
function reset() {
parseInt(jQuery("#points").html("-1"));
}
function startGame() {
$("#start").hide();
startCollisionChecker();
createRandBlocks();
moveBlocks();
randBlocks();
}
$(document).ready(
function() {
$("#start").click(startGame);
$(document).keydown(
function(key) {
leftMove(key);
rightMove(key);
}
);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment