MCPcopy Create free account
hub / github.com/codemistic/Web-Development / draw

Function draw

Snake Game /food.js:14–20  ·  view source on GitHub ↗
(gameBoard)

Source from the content-addressed store, hash-verified

12}
13
14export function draw(gameBoard) {
15 const foodElement = document.createElement('div')
16 foodElement.style.gridRowStart = food.y
17 foodElement.style.gridColumnStart = food.x
18 foodElement.classList.add('food')
19 gameBoard.appendChild(foodElement)
20}
21
22function getRandomFoodPosition() {
23 let newFoodPosition

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected