MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / createBoard

Function createBoard

assets/js/2048.js:10–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9 //create the playing board
10 function createBoard() {
11 for (let i = 0; i < width * width; i++) {
12 square = document.createElement('div')
13 square.innerHTML = 0
14 gridDisplay.appendChild(square)
15 boxes.push(square)
16 }
17 generate()
18 generate()
19 }
20 createBoard()
21
22 //generate a new number

Callers 1

2048.jsFile · 0.70

Calls 1

generateFunction · 0.70

Tested by

no test coverage detected