Skip to content

Instantly share code, notes, and snippets.

@Synvox
Created March 13, 2012 23:35
Show Gist options
  • Save Synvox/2032681 to your computer and use it in GitHub Desktop.
Save Synvox/2032681 to your computer and use it in GitHub Desktop.
var btn=document.createElement("button");
btn.setAttribute("onclick","winTheGame()");
btn.innerHTML="Get the High Score!";
document.getElementById("canvas_rider").parentNode.insertBefore(btn,document.getElementById("canvas_rider").nextSibling);
function winTheGame(){
C.BU=1; C.Be=C.BU; AZ[0][0]=1; AP.z=5001; C.z=5002; AP.DC();
}
document.onkeyup=function(e){
if (e.keyCode&&e.keyCode==32)
winTheGame();
old();
}
alert("Press space or click the button below to win the game.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment