Skip to content

Commit

Permalink
blep
Browse files Browse the repository at this point in the history
  • Loading branch information
increpare committed May 8, 2015
1 parent 9226bf6 commit 5184be0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pinball.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,11 @@ function ballCollides(){
function init() {
setInterval(tick, tickLength);

if (PLAYER===false){
if (PLAYER===true){
scoreText = document.getElementById("scoreText");
highScoreText = document.getElementById("highScoreText");
setScoreText();
} else {
titleInput=document.getElementById("titleInput");
titleInput.value=gameTitle;

Expand All @@ -1153,10 +1157,6 @@ function ballCollides(){
winTextInput=document.getElementById("winText");
winTextInput.value=winText;

scoreText = document.getElementById("scoreText");
highScoreText = document.getElementById("highScoreText");
setScoreText();

for (var i=0;i<16;i++){
elem = document.getElementById("color_"+(i));
if (elem!==null){
Expand All @@ -1168,7 +1168,7 @@ function ballCollides(){
if (elem!==null){
elem.style.backgroundColor=colorPalette[0];
}
}
}

visibleCanvas = document.getElementById("mainCanvas");

Expand Down

0 comments on commit 5184be0

Please sign in to comment.