From cc91fda43dfc8c66fb2fc464602eb59458271e58 Mon Sep 17 00:00:00 2001 From: syoul Date: Fri, 28 Nov 2025 18:34:51 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20visibilit=C3=A9=20items=20L?= =?UTF-8?q?udo:=20ic=C3=B4ne=20=C3=A9toile=20dor=C3=A9e=20plus=20grande=20?= =?UTF-8?q?et=20plus=20visible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game.js | 130 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 81 insertions(+), 49 deletions(-) diff --git a/game.js b/game.js index 0113bf1..8049362 100644 --- a/game.js +++ b/game.js @@ -53,66 +53,66 @@ const originalMaze1 = [ const originalMaze2 = [ [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], - [1,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,1], - [1,2,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,2,1], - [1,2,2,2,1,1,2,1,1,2,1,1,2,1,1,1,1,2,1,1,2,1,1,2,1,1,2,2,2,1], - [1,1,1,2,1,1,2,2,2,2,1,1,2,2,2,2,2,2,1,1,2,2,2,2,1,1,2,1,1,1], - [1,2,2,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,2,1], - [1,2,1,1,1,1,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,1,1,1,1,2,1], - [1,2,2,2,2,2,2,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,2,2,2,2,2,2,1], - [1,1,1,1,1,1,2,1,1,2,2,2,2,2,1,1,2,2,2,2,2,1,1,2,1,1,1,1,1,1], - [0,0,0,0,0,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,0,0,0,0,0], - [0,0,0,0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else if (this.type === BONUS_LUDO) { + const size = CELL_SIZE * 0.45; + ctx.fillStyle = '#ffd700'; - ctx.font = `bold ${CELL_SIZE * 0.4}px Arial`; + ctx.strokeStyle = '#ffaa00'; + ctx.lineWidth = 3; + + ctx.beginPath(); + const spikes = 5; + const outerRadius = size; + const innerRadius = size * 0.4; + + for (let i = 0; i < spikes * 2; i++) { + const angle = (i * Math.PI) / spikes; + const radius = i % 2 === 0 ? outerRadius : innerRadius; + const x = Math.cos(angle) * radius; + const y = Math.sin(angle) * radius; + + if (i === 0) { + ctx.moveTo(x, y); + } else { + ctx.lineTo(x, y); + } + } + ctx.closePath(); + ctx.fill(); + ctx.stroke(); + + ctx.fillStyle = '#ffff00'; + ctx.beginPath(); + ctx.arc(0, 0, size * 0.3, 0, Math.PI * 2); + ctx.fill(); + + ctx.fillStyle = '#ffd700'; + ctx.font = `bold ${size * 0.6}px Arial`; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.fillText('L', 0, 0);