Skip to content

Commit

Permalink
Apply latest code quality advice from sonar 3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rheh committed Apr 15, 2013
1 parent e9493e7 commit b2bccc1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions ball/ball.js
@@ -1,6 +1,5 @@
/*jslint plusplus: true, sloppy: true, indent: 4 */
(function () {

"use strict";
// this function is strict...
// RequestAnimFrame: a browser API for getting smooth animations
Expand Down Expand Up @@ -81,7 +80,7 @@
1: {
/* basketball */
bgimagex: 0,
bgimagey: 1205,
bgimagey: 1205,
factor: 0.8,
height: 50,
top: iBallTop,
Expand All @@ -90,7 +89,7 @@
2: {
/* Medicen ball */
bgimagex: 256,
bgimagey: 1205,
bgimagey: 1205,
factor: 0.7,
top: iBallTop,
height: 50,
Expand Down Expand Up @@ -125,18 +124,17 @@

function setUpBalls() {
var iBallTop,
i,
ball = null,
x = 0;
while (x < 950) {
iBallTop = (0 - Math.floor((Math.random() * 400) + 1));
ball = getRandomBallSettings(iBallTop);
balls.push(new Ball(x, bg, ball));
x += ball.width + 10;
}
}
loop();
}

function loadBackground() {
// Load the background
bg = new Image();
Expand All @@ -150,7 +148,7 @@
loadBackground();
}

window.addEventListener('load', function (ev) {
window.addEventListener('load', function () {
init();
}, false);

Expand Down

0 comments on commit b2bccc1

Please sign in to comment.