()
| 5 | const EXPANSION_RATE = 5 |
| 6 | |
| 7 | export function update() { |
| 8 | if (onSnake(food)) { |
| 9 | expandSnake(EXPANSION_RATE) |
| 10 | food = getRandomFoodPosition() |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | export function draw(gameBoard) { |
| 15 | const foodElement = document.createElement('div') |
nothing calls this directly
no test coverage detected