Merge branch 'main' into dev

recuperation de la version valide du projet
This commit is contained in:
2026-08-04 10:20:45 +02:00
11 changed files with 31 additions and 35 deletions

View File

@@ -9,6 +9,7 @@
</head>
<body>
<h1>Echoes</h1>
<p id="timerDisplay">Temps restant : --</p>
<canvas id="maze" width="490" height="490" style="border: 1px solid #333;"></canvas>
<div id="gameOverScreen" style="display: none">
@@ -21,6 +22,7 @@
<p>Vous avec franchi les portes a temps.</p>
</div>
<script src="/socket.io/socket.io.js"></script>
<script type="module" src="js/main.js"></script>
</body>
</html>

View File

@@ -15,7 +15,7 @@ export function drawMaze() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (let y = 0; y < maze.length; y++) {
for (let x = 0; y < maze.length; x++) {
for (let x = 0; x < maze[y].length; x++) {
if (maze[y][x] === 1) ctx.fillStyle = "#333";
else if (maze[y][x] === 2) ctx.fillStyle = "gold";
else ctx.fillStyle = "#eee";

View File

@@ -13,9 +13,10 @@ import { speakInstruction} from "guideVoice.js";
setupMovement();
socket.on("status", (msg) => console.log("Status: ", (msg));
roleState.current = role;
socket.on("status", (msg) => console.log("Status: ", msg));
socket.on("role", (role) => {
roleState.current = role;
if (role === "explorateur") {
render();
} else {

View File

@@ -12,5 +12,5 @@ export const maze = [
[1,0,1,0,1,0,1],
[1,0,1,1,1,0,1],
[1,0,0,0,0,0,1],
[1,1,1,1,1,1,1]
[1,1,2,1,1,2,1]
];