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

@@ -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 {

16
client/js/maze.js Normal file
View File

@@ -0,0 +1,16 @@
/*
maze.js
1 = mur
0 = chemin
2 = porte
*/
export const maze = [
[1,1,1,1,1,1,1],
[1,0,0,0,1,0,1],
[1,0,1,0,1,0,1],
[1,0,1,0,1,0,1],
[1,0,1,1,1,0,1],
[1,0,0,0,0,0,1],
[1,1,2,1,1,2,1]
];