Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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