Skip to content

Commit

Permalink
Balance score, maximum lose decreased to 50
Browse files Browse the repository at this point in the history
  • Loading branch information
Casmo committed Aug 28, 2015
1 parent 08c9c4d commit 73cfd74
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/BreakOut.Ball.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ BreakOut.Ball.prototype.update = function (time) {
speed.y = -speed.y;
pos.y = (settings.height - radius);
var removeScore = Math.floor(BreakOut.score.A * .5);
if (removeScore > 100) {
removeScore = 100;
if (removeScore > 50) {
removeScore = 50;
}
//BreakOut.score.A -= removeScore;
BreakOut.addScore('A', -removeScore, {x: pos.x, y: pos.y});
Expand All @@ -322,8 +322,8 @@ BreakOut.Ball.prototype.update = function (time) {
speed.y = Math.abs(speed.y);
pos.y = radius;
var removeScore = Math.floor(BreakOut.score.B * .5);
if (removeScore > 100) {
removeScore = 100;
if (removeScore > 50) {
removeScore = 50;
}
BreakOut.addScore('B', -removeScore, {x: pos.x, y: pos.y});
//BreakOut.score.B -= removeScore;
Expand Down
1 change: 1 addition & 0 deletions src/BreakOut.BrickFourStones.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ BreakOut.BrickFourStones = function (settings) {
'brick-4-001.png',
'brick-4-002.png'
];
this.score = 25;
};

BreakOut.BrickFourStones.prototype = Object.create(BreakOut.Brick.prototype);
1 change: 1 addition & 0 deletions src/BreakOut.BrickStone.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ BreakOut.BrickStone = function (settings) {
'brick-stone-002.png',
'brick-stone-003.png'
];
this.score = 50;
};

BreakOut.BrickStone.prototype = Object.create(BreakOut.Brick.prototype);
2 changes: 1 addition & 1 deletion src/BreakOut.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var BreakOut = {
* Game width and height
*/
settings: {
debug: true,
debug: false,
width: 1280,
height: 720,
assetDir: 'assets/',
Expand Down

0 comments on commit 73cfd74

Please sign in to comment.