Skip to content
Snippets Groups Projects
Commit 6e39fe5c authored by Jonas Leder's avatar Jonas Leder
Browse files

head of snake is darker than body

parent 3e14f199
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,10 @@ $fieldSize: 20;
.target {
background-color: red !important;
}
.snake {
.snake-head {
background-color: color.adjust($color-primary, $lightness:-10%) !important;
}
.snake-body {
background-color: color.adjust($color-primary, $lightness:-5%) !important;
}
}
......
......@@ -18,7 +18,10 @@ function drawField(){
for(let y:number = 0; y<snake.length; y++){
let currentSnake = snake[y];
if(currentSnake[0] == i && currentSnake[1] == x){
elementClass += " snake";
if(y == snake.length - 1)
elementClass += " snake-head";
else
elementClass += " snake-body";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment