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

Function initArena

assets/js/TetrisGame.js:155–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155function initArena() {
156 arena = [];
157
158 const r = new Array(tWidth + 2).fill(1);
159 arena.push(r);
160
161 for (let i = 0; i < tHeight; i++) {
162 let row = new Array(tWidth).fill(0);
163 row.push(1);
164 row.unshift(1);
165
166 arena.push(row);
167 }
168
169 arena.push(r);
170 arena.push(r);
171}
172
173function gameOver() {
174 for (let j = 1; j < arena[1].length-1; j++)

Callers 2

gameOverFunction · 0.85
TetrisGame.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected