Skip to content

Commit

Permalink
fix gap in background image
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Thornton committed Nov 10, 2016
1 parent 223332c commit cd70215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Game.prototype.isItEnd = function(){
Game.prototype.display = function(){
this.ctx.clearRect(0, 0, this.width, this.height);
for(var i = 0; i < Math.ceil(this.width / images.background.width) + 1; i++){
this.ctx.drawImage(images.background, i * images.background.width - (this.backgroundx%images.background.width), 0)
this.ctx.drawImage(images.background, i * images.background.width - Math.floor(this.backgroundx%images.background.width), 0)
}

for(var i in this.pipes){
Expand Down

0 comments on commit cd70215

Please sign in to comment.