From 6a637fcf601b86bab0b4009f8642f3ac261947c8 Mon Sep 17 00:00:00 2001 From: Killian Marty Date: Wed, 6 Dec 2023 19:51:25 +0100 Subject: [PATCH] cleaning code --- js/render.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/render.js b/js/render.js index a981f3a..f54971e 100644 --- a/js/render.js +++ b/js/render.js @@ -64,10 +64,10 @@ class Render { */ const fond = new Image(); fond.src = this.mapsrc; - mapWidth = fond.width - mapHeith = fond.height - this.ctx.canvas.width = mapWidth - this.ctx.canvas.height = mapHeith + mapWidth = fond.width; + mapHeith = fond.height; + this.ctx.canvas.width = mapWidth; + this.ctx.canvas.height = mapHeith; this.ctx.drawImage(fond, 0, 0, mapWidth, mapHeith); this.players.forEach((player) => { this.RenderPlayer(player);