fix(offline pong): cam's fault

This commit is contained in:
AdrienLSH 2024-03-30 13:52:01 +01:00
parent 2635e9b05f
commit 1b84c8e40c

View File

@ -180,7 +180,7 @@ class Game {
if ((this.keys.includes('s') || this.keys.includes('down1')) && if ((this.keys.includes('s') || this.keys.includes('down1')) &&
this.players[0].paddle.y + this.def.PADDLEHEIGHT < this.def.CANVASHEIGHT - this.def.PADDLEMARGIN) this.players[0].paddle.y + this.def.PADDLEHEIGHT < this.def.CANVASHEIGHT - this.def.PADDLEMARGIN)
this.players[0].paddle.y += this.def.PADDLESPEED; this.players[0].paddle.y += this.def.PADDLESPEED;
if ((this.keys.includes('2') || this.keys.includes('up1')) && if ((this.keys.includes('w') || this.keys.includes('up1')) &&
this.players[0].paddle.y > 0 + this.def.PADDLEMARGIN) this.players[0].paddle.y > 0 + this.def.PADDLEMARGIN)
this.players[0].paddle.y -= this.def.PADDLESPEED; this.players[0].paddle.y -= this.def.PADDLESPEED;