From 1b84c8e40c35842d651f7200cdfb8aa6ae3dfe68 Mon Sep 17 00:00:00 2001 From: AdrienLSH Date: Sat, 30 Mar 2024 13:52:01 +0100 Subject: [PATCH] fix(offline pong): cam's fault --- frontend/static/js/views/GameOfflineView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/static/js/views/GameOfflineView.js b/frontend/static/js/views/GameOfflineView.js index 1ffc414..b07bae5 100644 --- a/frontend/static/js/views/GameOfflineView.js +++ b/frontend/static/js/views/GameOfflineView.js @@ -180,7 +180,7 @@ class Game { 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.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 -= this.def.PADDLESPEED;