From 36e80274ffad949955cf595708c5fd8d768ff80b Mon Sep 17 00:00:00 2001 From: syoul Date: Fri, 28 Nov 2025 18:41:14 +0100 Subject: [PATCH] =?UTF-8?q?Rebranding:=20changement=20PACMAN=20en=20OULVIC?= =?UTF-8?q?=20et=20design=20r=C3=A9tro=20ann=C3=A9es=2080=20pour=20les=20f?= =?UTF-8?q?ant=C3=B4mes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game.js | 48 +++++++++++++++++++++++++++++++++--------------- index.html | 6 +++--- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/game.js b/game.js index 8049362..5bae277 100644 --- a/game.js +++ b/game.js @@ -327,31 +327,49 @@ class Ghost { draw() { ctx.save(); ctx.translate(this.pixelX, this.pixelY); + + const size = CELL_SIZE * 0.4; + ctx.fillStyle = this.color; + ctx.strokeStyle = '#000000'; + ctx.lineWidth = 2; ctx.beginPath(); - ctx.arc(0, -CELL_SIZE * 0.15, CELL_SIZE * 0.3, Math.PI, 0, false); - ctx.rect(-CELL_SIZE * 0.3, -CELL_SIZE * 0.15, CELL_SIZE * 0.6, CELL_SIZE * 0.45); + ctx.arc(0, -size * 0.3, size * 0.5, Math.PI, 0, false); ctx.fill(); - + ctx.stroke(); + + ctx.fillRect(-size * 0.5, -size * 0.3, size * 1.0, size * 0.7); + ctx.strokeRect(-size * 0.5, -size * 0.3, size * 1.0, size * 0.7); + + const waveHeight = size * 0.15; + const waveWidth = size * 0.2; ctx.beginPath(); - ctx.rect(-CELL_SIZE * 0.3, CELL_SIZE * 0.3, CELL_SIZE * 0.2, CELL_SIZE * 0.2); - ctx.rect(-CELL_SIZE * 0.1, CELL_SIZE * 0.3, CELL_SIZE * 0.2, CELL_SIZE * 0.2); - ctx.rect(CELL_SIZE * 0.1, CELL_SIZE * 0.3, CELL_SIZE * 0.2, CELL_SIZE * 0.2); + ctx.moveTo(-size * 0.5, size * 0.4); + for (let i = 0; i < 5; i++) { + const x = -size * 0.5 + i * waveWidth; + const y = size * 0.4 + (i % 2 === 0 ? 0 : waveHeight); + ctx.lineTo(x, y); + } + ctx.lineTo(size * 0.5, size * 0.4); + ctx.lineTo(size * 0.5, size * 0.7); + ctx.lineTo(-size * 0.5, size * 0.7); + ctx.closePath(); ctx.fill(); - - ctx.fillStyle = '#fff'; + ctx.stroke(); + + ctx.fillStyle = '#ffffff'; ctx.beginPath(); - ctx.arc(-CELL_SIZE * 0.15, -CELL_SIZE * 0.1, CELL_SIZE * 0.08, 0, Math.PI * 2); - ctx.arc(CELL_SIZE * 0.15, -CELL_SIZE * 0.1, CELL_SIZE * 0.08, 0, Math.PI * 2); + ctx.arc(-size * 0.2, -size * 0.1, size * 0.12, 0, Math.PI * 2); + ctx.arc(size * 0.2, -size * 0.1, size * 0.12, 0, Math.PI * 2); ctx.fill(); - - ctx.fillStyle = '#000'; + + ctx.fillStyle = '#000000'; ctx.beginPath(); - ctx.arc(-CELL_SIZE * 0.15, -CELL_SIZE * 0.1, CELL_SIZE * 0.04, 0, Math.PI * 2); - ctx.arc(CELL_SIZE * 0.15, -CELL_SIZE * 0.1, CELL_SIZE * 0.04, 0, Math.PI * 2); + ctx.arc(-size * 0.2, -size * 0.1, size * 0.06, 0, Math.PI * 2); + ctx.arc(size * 0.2, -size * 0.1, size * 0.06, 0, Math.PI * 2); ctx.fill(); - + ctx.restore(); } } diff --git a/index.html b/index.html index bc0a463..920077f 100644 --- a/index.html +++ b/index.html @@ -3,13 +3,13 @@ - Jeu Pacman + Jeu Oulvic
-

PACMAN

+

OULVIC

@@ -21,7 +21,7 @@
-

Utilisez les flèches directionnelles pour déplacer Pacman

+

Utilisez les flèches directionnelles pour déplacer Oulvic