snake: move extraneous logging to debug

This commit is contained in:
Trianta 2024-11-05 21:23:34 -06:00
parent de80157f2e
commit 33d5c491c2

View File

@ -81,7 +81,7 @@ class SnakeCore {
} }
reset() { reset() {
console.log("[LOG] Reset was triggered"); console.debug("[TRACE] Reset was triggered");
this.gameover = false; this.gameover = false;
this.foodAte = true; this.foodAte = true;
for (let i = 0; i < this.height; i++) { for (let i = 0; i < this.height; i++) {
@ -105,6 +105,7 @@ class SnakeCore {
foodRegen() { foodRegen() {
if (!this.foodAte) if (!this.foodAte)
return; return;
console.debug("[TRACE] Food reset was triggered");
this.foodAte = false; this.foodAte = false;
while (true) { while (true) {
let tmp = new Point(Math.floor(Math.random() * this.width), Math.floor(Math.random() * this.height)); let tmp = new Point(Math.floor(Math.random() * this.width), Math.floor(Math.random() * this.height));