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

Function addSegments

Snake Game /snake.js:52–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52function addSegments() {
53 for (let i = 0; i < newSegments; i++) {
54 snakeBody.push({ ...snakeBody[snakeBody.length - 1] })
55 }
56
57 newSegments = 0
58}

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected