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

Function drawArena

assets/js/TetrisGame.js:144–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142}
143
144function drawArena() {
145 for (let i = 1; i < arena.length-2; i++) {
146 for (let j = 1; j < arena[i].length-1; j++) {
147 if (arena[i][j]) {
148 ctx.fillStyle = colors[arena[i][j]];
149 ctx.fillRect(j-1, i-1, 1, 1);
150 }
151 }
152 }
153}
154
155function initArena() {
156 arena = [];

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected