remove lines between snakes body parts
Build and Push Docker Container / build-and-push (push) Successful in 1m9s

This commit is contained in:
2026-04-06 06:05:20 +02:00
parent afaf6c7c63
commit c4238d19e8
+15 -5
View File
@@ -1776,10 +1776,11 @@
if (snakeBody.has(key)) {
const hasHeadIcon = headIconByCell.has(key);
const hasTailIcon = tailIconByCell.has(key);
const bodyColor = snakeBody.get(key);
if (hasHeadIcon || hasTailIcon) {
//cell.style.background = "var(--cell)";
} else {
cell.style.background = snakeBody.get(key);
cell.style.background = bodyColor;
}
if (selectedSnakeId && snakeIdByCell.get(key) !== selectedSnakeId) {
cell.style.opacity = "0.2";
@@ -1796,24 +1797,33 @@
if (up && right && !down && !left) {
cell.classList.add("snake-turn-cell");
cell.classList.add("snake-turn-dl");
cell.style.setProperty("--turn-color", snakeBody.get(key));
cell.style.setProperty("--turn-color", bodyColor);
cell.style.background = "var(--cell)";
} else if (up && left && !down && !right) {
cell.classList.add("snake-turn-cell");
cell.classList.add("snake-turn-dr");
cell.style.setProperty("--turn-color", snakeBody.get(key));
cell.style.setProperty("--turn-color", bodyColor);
cell.style.background = "var(--cell)";
} else if (down && right && !up && !left) {
cell.classList.add("snake-turn-cell");
cell.classList.add("snake-turn-ul");
cell.style.setProperty("--turn-color", snakeBody.get(key));
cell.style.setProperty("--turn-color", bodyColor);
cell.style.background = "var(--cell)";
} else if (down && left && !up && !right) {
cell.classList.add("snake-turn-cell");
cell.classList.add("snake-turn-ur");
cell.style.setProperty("--turn-color", snakeBody.get(key));
cell.style.setProperty("--turn-color", bodyColor);
cell.style.background = "var(--cell)";
}
const bridgeShadows = [];
if (up) bridgeShadows.push(`0 -1px 0 ${bodyColor}`);
if (down) bridgeShadows.push(`0 1px 0 ${bodyColor}`);
if (left) bridgeShadows.push(`-1px 0 0 ${bodyColor}`);
if (right) bridgeShadows.push(`1px 0 0 ${bodyColor}`);
if (bridgeShadows.length > 0) {
cell.style.boxShadow = bridgeShadows.join(", ");
}
}
}
}