update color
This commit is contained in:
parent
0ad707476d
commit
afe39c77c4
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
bgColor: "blue",
|
||||||
unit: 20,
|
unit: 20,
|
||||||
dimensions: {
|
dimensions: {
|
||||||
width: 30,
|
width: 30,
|
||||||
@ -14,5 +14,5 @@ export default {
|
|||||||
food: {
|
food: {
|
||||||
x: null,
|
x: null,
|
||||||
y: null,
|
y: null,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
import keys from "./utils/keys";
|
import keys from "./utils/keys";
|
||||||
import { S, N, A, K, E } from "./utils/letters";
|
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_STARTED = false;
|
||||||
let GAME_RUNNING;
|
let GAME_RUNNING;
|
||||||
@ -40,7 +40,7 @@ for (let i = 0; i < dimensions.height; i++) {
|
|||||||
width: `${unit}px`,
|
width: `${unit}px`,
|
||||||
height: `${unit}px`,
|
height: `${unit}px`,
|
||||||
display: "inline-block",
|
display: "inline-block",
|
||||||
background: "green",
|
background: bgColor,
|
||||||
},
|
},
|
||||||
"board"
|
"board"
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user