First version of laser

This commit is contained in:
2026-03-30 14:10:19 +02:00
parent 04a0e1a912
commit 001adb89bd
2 changed files with 62 additions and 37 deletions

View File

@@ -10,18 +10,19 @@ const legend = {
wall: 6,
demiWall: 7,
target: 8,
ligthLaser: 9,
}
// Grid test
let grid = [
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 8, 0],
[0, 0, 3, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 8, 0],
[1, 9, 9, 9, 9, 9, 3, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
]
@@ -67,6 +68,9 @@ function loadGrid () {
case legend.target:
cell.classList.add("target");
break;
case legend.ligthLaser:
cell.classList.add("light-laser");
break;
}
lign.appendChild(cell);