update color

This commit is contained in:
Fredrik Jensen 2025-10-29 01:33:40 +01:00
parent 0ad707476d
commit afe39c77c4
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
export default {
bgColor: "blue",
unit: 20,
dimensions: {
width: 30,
@ -14,5 +14,5 @@ export default {
food: {
x: null,
y: null,
}
};
},
};

View File

@ -9,7 +9,7 @@ import {
import keys from "./utils/keys";
import { S, N, A, K, E } from "./utils/letters";
const { dimensions, unit, snake, food } = config;
const { dimensions, unit, snake, food, bgColor } = config;
let GAME_STARTED = false;
let GAME_RUNNING;
@ -40,7 +40,7 @@ for (let i = 0; i < dimensions.height; i++) {
width: `${unit}px`,
height: `${unit}px`,
display: "inline-block",
background: "green",
background: bgColor,
},
"board"
);