Created
January 15, 2016 07:21
-
-
Save shrutis22/21015fd67fc57ace11a9 to your computer and use it in GitHub Desktop.
Start Game - Brick Game
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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