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

Function mainGameLoop

assets/js/pixels.js:79–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78
79function mainGameLoop() {
80
81 var pixelfall = setInterval(() => Pixel(pixelfall, speedfall), fallingTime);
82
83 var speedfall = setInterval(() => {
84 if (fallingSpeed > 2) fallingSpeed -= 1;
85 }, 10000);
86
87}
88
89// Restart game on pressing Play again
90document.getElementById('restart-btn').addEventListener('click', () => {

Callers 1

initializeEnvironmentFunction · 0.85

Calls 1

PixelFunction · 0.85

Tested by

no test coverage detected