From c62563be8c9909b4901fbfb40215948fa430f6a3 Mon Sep 17 00:00:00 2001 From: Shubham Panth Date: Sat, 27 Apr 2024 20:36:19 +0200 Subject: [PATCH] Comment Console.log so user pc don't overload on background (#1624) Comment console.log so user pc don't overload while fixing #1568 I saw that some games use loop console.log causing 10k consoles per min making user's pc work slowly, this would happen on the webpage + anytime someone tries to play games this comment out so the developer can still uncomment and test locally --- games/15_puzzle.js | 8 ++-- games/256.js | 2 +- games/3D_wire_frame_rendererV1.js | 20 ++++----- games/5-in-1-Carnival-Game-Pack!.js | 8 ++-- games/9_puzzle.js | 2 +- games/Amoeba.js | 2 +- games/AmongTheStars.js | 2 +- games/Amongus_flight.js | 2 +- games/Avoid_The_Tree.js | 2 +- games/Bert_Blaster.js | 6 +-- games/Binary_Eater.js | 6 +-- games/Blob_Runner.js | 6 +-- games/Cheese-Hunt.js | 8 ++-- games/ConnectX.js | 2 +- games/Desine_Mini.js | 4 +- games/Disco.js | 4 +- games/Dodge_The_Rock.js | 2 +- games/Mario_Kart.js | 2 +- games/MicroBot_Adventure.js | 4 +- games/Mining_Simulator.js | 2 +- games/Orpheus'_Burger_Dash.js | 2 +- games/PennyPlatformer.js | 4 +- games/Physics_Sandbox.js | 4 +- games/Protect_The_Surfer.js | 2 +- games/RandomDungeon-final.js | 10 ++--- games/Rythym.js | 2 +- games/Snake.js | 2 +- games/Snake_Boxes.js | 4 +- games/Sort.js | 8 ++-- games/Space_Invasion.js | 2 +- games/Sprigressbar.js | 2 +- games/The_Legend_Of_Sprig.js | 42 +++++++++---------- games/The_Story_of_Grass.js | 6 +-- games/Tic-Tac-No.js | 6 +-- games/Tron.js | 16 +++---- games/Virtual_Machine.js | 2 +- games/basketballgame.js | 16 +++---- games/bastion.js | 32 +++++++------- games/black_jack.js | 2 +- games/burger_build.js | 12 +++--- games/catch_orpheus.js | 8 ++-- games/chess.js | 6 +-- games/color_patterns.js | 2 +- games/connect_four.js | 2 +- games/cookie_clicker.js | 4 +- games/cubefield.js | 4 +- games/desi-pong.js | 2 +- games/ding_dong-delivery.js | 4 +- games/fire_boom.js | 2 +- games/flappy_bird_but_no_gravity_and_worse.js | 2 +- games/flappysprig.js | 4 +- games/floppyMatch.js | 14 +++---- games/fogged.js | 2 +- games/galloping.js | 2 +- games/generic_dungeon_crawler.js | 2 +- games/gravity_box.js | 2 +- games/hex_hubbub.js | 2 +- games/hidden_maze.js | 4 +- games/hidden_maze_escape.js | 4 +- games/infinite_maze.js | 8 ++-- games/kindless.js | 4 +- games/mailman.js | 8 ++-- games/mini_maze_and_puzzle.js | 4 +- games/offline_t-rex_game.js | 2 +- games/orbit_blaster.js | 4 +- games/osu-mania.js | 2 +- games/plants_vs_zombies.js | 4 +- games/pong-multiplayer.js | 2 +- games/racer.js | 4 +- games/reversi.js | 6 +-- games/shitpest.js | 2 +- games/silicon-valley-obby.js | 6 +-- games/snake_game.js | 2 +- games/sudoku.js | 2 +- games/sweepar.js | 10 ++--- games/the_impossible_puzzle.js | 8 ++-- games/the_invisible_man.js | 10 ++--- .../the_journey_of_the_box_a_sokoban_saga.js | 4 +- games/tictactoe.js | 4 +- games/uav.js | 2 +- games/wham.js | 2 +- 81 files changed, 221 insertions(+), 221 deletions(-) diff --git a/games/15_puzzle.js b/games/15_puzzle.js index dc34079158..46d4675974 100644 --- a/games/15_puzzle.js +++ b/games/15_puzzle.js @@ -339,7 +339,7 @@ if (!solvable) { puzzle.push(16); -console.log(puzzle) +// console.log(puzzle) let puzzleIdx = 0; let mapStr = "" @@ -350,7 +350,7 @@ for (let i = 0; i < 4; i++) { } mapStr += "\n"; } -console.log(mapStr); +// console.log(mapStr); setMap(map`${mapStr}`); @@ -401,8 +401,8 @@ afterInput(async () => { for (let x = 0; x < 4; x++) { const t = getTile(x, y); if (t.length && t[0].type != tiles[tileIdx]) { - console.log("got type", t[0].type) - console.log('expected', tiles[tileIdx]) + // console.log("got type", t[0].type) + // console.log('expected', tiles[tileIdx]) return } tileIdx++; diff --git a/games/256.js b/games/256.js index ccfdc8c36b..63abbc19dc 100644 --- a/games/256.js +++ b/games/256.js @@ -248,7 +248,7 @@ function moveAll(dx, dy) { blocks.forEach(block => getAll(block).forEach(sprite => { // check if neighbour is of same type const neighbourTiles = getTile(sprite.x + dx, sprite.y + dy).map(t => t.type); - console.log(neighbourTiles); + // console.log(neighbourTiles); if (neighbourTiles.includes(block) || neighbourTiles.length === 0) { sprite.x += dx; sprite.y += dy; diff --git a/games/3D_wire_frame_rendererV1.js b/games/3D_wire_frame_rendererV1.js index 770f234a07..ca97f34b21 100644 --- a/games/3D_wire_frame_rendererV1.js +++ b/games/3D_wire_frame_rendererV1.js @@ -207,32 +207,32 @@ let focal_length = 30; // i onInput("i", () => { translationy += 1; - console.log("translationy: ", translationy) + // console.log("translationy: ", translationy) }) // k onInput("k", () => { translationy += -1; - console.log("translationy: ", translationy) + // console.log("translationy: ", translationy) }) // a onInput("a", () => { translationx += -1; - console.log("translationx: ", translationx) + // console.log("translationx: ", translationx) }) // d onInput("d", () => { translationx += 1; - console.log("translationx: ", translationx) + // console.log("translationx: ", translationx) }) // s onInput("s", () => { translationz += -1; - console.log("translationz: ", translationz) + // console.log("translationz: ", translationz) }) // w onInput("w", () => { translationz += 1; - console.log("translationz: ", translationz) + // console.log("translationz: ", translationz) }) // j to stop onInput("j", () => { @@ -260,7 +260,7 @@ function draw_line(x1, y1, x2, y2) { // Iterators, counters required by algor addSprite(Math.round(x), (y), blue_pixel); // Draw first pixel // Rasterize the line } catch (error) { - console.log("outside of screen") + // console.log("outside of screen") } for (i = 0; x < xe; i++) { x = x + 1; // Deal with octants... @@ -279,7 +279,7 @@ function draw_line(x1, y1, x2, y2) { // Iterators, counters required by algor addSprite(Math.round(x), Math.round(y), blue_pixel); } catch (error) { - console.log("outside of screen") + // console.log("outside of screen") } } } else { // The line is Y-axis dominant // Line is drawn bottom to top if (dy >= 0) { @@ -291,7 +291,7 @@ function draw_line(x1, y1, x2, y2) { // Iterators, counters required by algor addSprite(Math.round(x), Math.round(y), blue_pixel); // Draw first pixel // Rasterize the line } catch (error) { - console.log("outside of screen") + // console.log("outside of screen") } for (i = 0; y < ye; i++) { y = y + 1; // Deal with octants... @@ -310,7 +310,7 @@ function draw_line(x1, y1, x2, y2) { // Iterators, counters required by algor addSprite(Math.round(x), Math.round(y), blue_pixel); } catch (error) { - console.log("outside of screen") + // console.log("outside of screen") } } } diff --git a/games/5-in-1-Carnival-Game-Pack!.js b/games/5-in-1-Carnival-Game-Pack!.js index 57ecb6abae..1a98817ff6 100644 --- a/games/5-in-1-Carnival-Game-Pack!.js +++ b/games/5-in-1-Carnival-Game-Pack!.js @@ -130,7 +130,7 @@ class WhackOrpheus { o.y = Math.floor(Math.random() * 3) if (i[0]) { - console.log(i) + // console.log(i) if (i[0]._type == "s") { addText("You caught him!", {color: color`H`}) setTimeout(()=> { @@ -181,7 +181,7 @@ class Piano { let s = getFirst(selector2) let i = getTile(s.x, s.y) - console.log(i) + // console.log(i) if (i[0]._type == "3") { playTune(a) @@ -982,9 +982,9 @@ p.......... setMap(levels[level]); -console.log("hoi1") +// console.log("hoi1") if (game == "none") { - console.log("menu setup") + // console.log("menu setup") setBackground(bg); mapNat = getMapV2(); setMapV2(trimMapV2(px-5, py-4, 10, 8, mapNat)); diff --git a/games/9_puzzle.js b/games/9_puzzle.js index e2484c92b2..e317e6a4fc 100644 --- a/games/9_puzzle.js +++ b/games/9_puzzle.js @@ -115,7 +115,7 @@ onInput("k", _ => { }) afterInput(_ => { - console.log(tilesWith(red,target)); + // console.log(tilesWith(red,target)); }) const moveTileTo = (x,y) => { diff --git a/games/Amoeba.js b/games/Amoeba.js index 2e9f123ae3..5e958ef179 100644 --- a/games/Amoeba.js +++ b/games/Amoeba.js @@ -425,7 +425,7 @@ function getSequenceOfMarks(initialX, initialY, xStepDirection, yStepDirection, function checkForWin() { const marks = marksPlaced.filter(mark => mark.type === currentTurn); - console.log("M", marks); + // console.log("M", marks); const sequenceChecks = [[-1, 1], /*[1, -1],*/ [1, 1], /*[-1, -1],*/ [0, 1], /*[0, -1],*/ [-1, 0], /*[1, 0]*/]; diff --git a/games/AmongTheStars.js b/games/AmongTheStars.js index 49bb6b2d74..6b89d46f8f 100644 --- a/games/AmongTheStars.js +++ b/games/AmongTheStars.js @@ -310,7 +310,7 @@ setPushables({ addSprite(PlayerX + 1, PlayerY, FlyLazerRight); break; default: - console.log("I don't know what fruit that is."); + // console.log("I don't know what fruit that is."); } } } diff --git a/games/Amongus_flight.js b/games/Amongus_flight.js index 35130552c5..eb616999b9 100644 --- a/games/Amongus_flight.js +++ b/games/Amongus_flight.js @@ -135,7 +135,7 @@ getAll(blocker).forEach((w) => { function lost() { death = true; - console.log("You lost"); + // console.log("You lost"); setMap(map` ........ ........ diff --git a/games/Avoid_The_Tree.js b/games/Avoid_The_Tree.js index a795d4795d..ae4ef9ca2e 100644 --- a/games/Avoid_The_Tree.js +++ b/games/Avoid_The_Tree.js @@ -185,7 +185,7 @@ function gameLoop() { function lost() { gameOver = true; - console.log("You lost"); + // console.log("You lost"); setMap(map` ssssss ssssss diff --git a/games/Bert_Blaster.js b/games/Bert_Blaster.js index 146ef7a555..493fc819f3 100644 --- a/games/Bert_Blaster.js +++ b/games/Bert_Blaster.js @@ -347,7 +347,7 @@ addSprite(6, 6, obstacle); function stop() { - console.log('game stopped'); + // console.log('game stopped'); running = false; intervals.forEach((interval) => clearInterval(interval)); } @@ -400,7 +400,7 @@ function setupGamescoreInterval(){ const interval = setInterval(()=> { gameScore*= gameScoreMultipliciator; - console.log(gameScore.toFixed(0)); + // console.log(gameScore.toFixed(0)); },500); @@ -425,7 +425,7 @@ if(getFirst(obstacle)!=undefined){ getFirst(obstacle).x -= 1; } -console.log("running"); +// console.log("running"); diff --git a/games/Binary_Eater.js b/games/Binary_Eater.js index bbf64b8187..79912e0f4e 100644 --- a/games/Binary_Eater.js +++ b/games/Binary_Eater.js @@ -275,7 +275,7 @@ function generateBinaryMap() { let binaryMap = generateBinaryMap(); -console.log(binaryMap); +// console.log(binaryMap); onInput("w", () => { code(0); }); onInput("a", () => { code(1); }); @@ -302,7 +302,7 @@ function restart_game() { // l is also used to reset onInput("l", () => { - console.log("yep"); + // console.log("yep"); if (!game_running) { restart_game(); return; @@ -336,7 +336,7 @@ function code(digit) { return; } - console.log("Binary value: " + ch); + // console.log("Binary value: " + ch); letters += ch; bin = ""; diff --git a/games/Blob_Runner.js b/games/Blob_Runner.js index 8f142db74b..e6b23ff72c 100644 --- a/games/Blob_Runner.js +++ b/games/Blob_Runner.js @@ -434,7 +434,7 @@ function isDead(){ }else{ setMap(levels[loseindex]) stop = 1; - console.log('STOP') + // console.log('STOP') level = 0 clearText() } @@ -486,7 +486,7 @@ onInput("d", ()=>{ afterInput(() => { - console.log(getFirst(player).x) + // console.log(getFirst(player).x) if(level==6){ if(getTile(21, 15).length == 2){ clearTile(47, 0) @@ -518,7 +518,7 @@ afterInput(() => { } if(getFirst(player).x == widths[level]){ - console.log(widths[level]) + // console.log(widths[level]) level ++ setMap(levels[level]) } diff --git a/games/Cheese-Hunt.js b/games/Cheese-Hunt.js index 4ba08a6690..7348c12417 100644 --- a/games/Cheese-Hunt.js +++ b/games/Cheese-Hunt.js @@ -347,7 +347,7 @@ onInput("k", () => { const decoyTiles = tilesWith(decoy); const decoyTile = decoyTiles[0]; - console.log(decoyTile[0].x); + // console.log(decoyTile[0].x); decoyTiles.forEach(checkDecoy); function checkDecoy(decoy) { @@ -366,7 +366,7 @@ function checkNext() { boxPositionX = boxPosition[0].x; boxPositionY = boxPosition[0].y; - console.log(boxPosition[0].x); + // console.log(boxPosition[0].x); if ((getFirst(player).x === boxPositionX) && (getFirst(player).y === boxPositionY)) { return true; @@ -390,7 +390,7 @@ function checkCheese() { function checkTrap() { const traps = tilesWith(trap); - console.log(traps); + // console.log(traps); traps.forEach(trapLoop); @@ -428,7 +428,7 @@ function checkTunnel() { function bigTrapCheck() { const traps = tilesWith(bigTrap); - console.log(traps); + // console.log(traps); traps.forEach(trapLoop); diff --git a/games/ConnectX.js b/games/ConnectX.js index 313274abab..2fb27ea33b 100644 --- a/games/ConnectX.js +++ b/games/ConnectX.js @@ -272,7 +272,7 @@ function drawBoard() { function placeChip(col) { const numRows = board.length; for (let row = board.length; row > 0; row --) { - console.log(board[row-1][col]); + // console.log(board[row-1][col]); if (board[row-1][col] == '_') { board[row-1][col] = turn; if (turn == 'y') { diff --git a/games/Desine_Mini.js b/games/Desine_Mini.js index 13c1bfcbe7..f948016be8 100644 --- a/games/Desine_Mini.js +++ b/games/Desine_Mini.js @@ -1707,7 +1707,7 @@ function Boss1() { Boss1attack = Math.floor(Math.random() * 51); // 0 dash if (Boss1attack > 25 && canAttack) { - console.log("dash") + // console.log("dash") canAttack = false if (getFirst(boss1p1).x == 1) { let plat1x = Math.floor(Math.random() * 3); @@ -1920,7 +1920,7 @@ function Boss1() { } // 1 stars if (Boss1attack < 25 && canAttack) { - console.log("stars") + // console.log("stars") canAttack = false if (getFirst(boss1p1).x == 1) { let interval = 0 diff --git a/games/Disco.js b/games/Disco.js index 377c623f94..63531977ba 100644 --- a/games/Disco.js +++ b/games/Disco.js @@ -329,7 +329,7 @@ function startGame() { game = true; updateScore(score, lives); function gameInterval () { - console.log(lives) + // console.log(lives) if (lives <= 0) { clearText() playTune(music.gameOver) @@ -350,7 +350,7 @@ function startGame() { if (speed >= 350) { speed -= 5; } - console.log(speed) + // console.log(speed) setTimeout(gameInterval, speed) } } diff --git a/games/Dodge_The_Rock.js b/games/Dodge_The_Rock.js index 82f9b6b58a..4c36c27b2a 100644 --- a/games/Dodge_The_Rock.js +++ b/games/Dodge_The_Rock.js @@ -161,7 +161,7 @@ function gameLoop() { } function lost() { isGameOver = true; - console.log("You lost"); + // console.log("You lost"); setMap(map` ........ ........ diff --git a/games/Mario_Kart.js b/games/Mario_Kart.js index 4645780d58..aa244b87d1 100644 --- a/games/Mario_Kart.js +++ b/games/Mario_Kart.js @@ -204,7 +204,7 @@ function gameScore() { function lost() { GameOver = true; - console.log("You lost"); + // console.log("You lost"); setMap(map` llllll llllll diff --git a/games/MicroBot_Adventure.js b/games/MicroBot_Adventure.js index 06527ca2ba..cb5a6b1a48 100644 --- a/games/MicroBot_Adventure.js +++ b/games/MicroBot_Adventure.js @@ -543,7 +543,7 @@ setInterval(function () { getAll(laserEast).forEach((laserEastObj) => { getTile(laserEastObj.x, laserEastObj.y).forEach((sprite) => { - console.log(sprite.type); + // console.log(sprite.type); if ( sprite.type === enemyEast || sprite.type === enemySouth || @@ -562,7 +562,7 @@ setInterval(function () { }); getAll(laserWest).forEach((laserWestObj) => { getTile(laserWestObj.x, laserWestObj.y).forEach((sprite) => { - console.log(sprite.type); + // console.log(sprite.type); if ( sprite.type === enemyEast || sprite.type === enemySouth || diff --git a/games/Mining_Simulator.js b/games/Mining_Simulator.js index a3ed56f42a..303ace280b 100644 --- a/games/Mining_Simulator.js +++ b/games/Mining_Simulator.js @@ -413,7 +413,7 @@ onInput("d", () => { }); afterInput(() => { - console.log("yes"); + // console.log("yes"); }); // movement diff --git a/games/Orpheus'_Burger_Dash.js b/games/Orpheus'_Burger_Dash.js index a853ccf815..84e767f5ef 100644 --- a/games/Orpheus'_Burger_Dash.js +++ b/games/Orpheus'_Burger_Dash.js @@ -490,7 +490,7 @@ function itemFall(type) { let items = getAll(type); // Log the items array to the console for debugging - console.log('items of type ' + type + ':', items); + // console.log('items of type ' + type + ':', items); // Increment the y property of each sprite for (let i = 0; i < items.length; i++) { diff --git a/games/PennyPlatformer.js b/games/PennyPlatformer.js index 6d1e625c24..a9b8792a28 100644 --- a/games/PennyPlatformer.js +++ b/games/PennyPlatformer.js @@ -867,7 +867,7 @@ let level = 1 let coincount = 0 setInterval(()=>{ - console.log(getTile(coinPos[2][0], coinPos[2][1])) + // console.log(getTile(coinPos[2][0], coinPos[2][1])) getFirst(p_head2).y = getFirst(p_stand).y -1 getFirst(p_head2).x = getFirst(p_stand).x if(getTile(coinPos[1][0], coinPos[1][1]).length==2){ @@ -1002,7 +1002,7 @@ function isDead(){ } function dead(){ deader=true - console.log('test') + // console.log('test') setMap(map ` ............................. ............................. diff --git a/games/Physics_Sandbox.js b/games/Physics_Sandbox.js index 83112d3b39..083c37782f 100644 --- a/games/Physics_Sandbox.js +++ b/games/Physics_Sandbox.js @@ -576,9 +576,9 @@ setInterval(() => { setMap(screen); settingsManager.render(); t++; - console.log(entities); + // console.log(entities); inputSpeed = settingsManager.getValue("Pointer Speed"); - console.log(settingsManager.getValue("Pointer Speed")); + // console.log(settingsManager.getValue("Pointer Speed")); let setGrav = settingsManager.getValue("Gravity"); if (typeof setGrav == "string") { diff --git a/games/Protect_The_Surfer.js b/games/Protect_The_Surfer.js index 7ac6212354..3f16763051 100644 --- a/games/Protect_The_Surfer.js +++ b/games/Protect_The_Surfer.js @@ -266,7 +266,7 @@ afterInput(() => { playTune(goalSound); score++; updateScore(); - console.log(tilesWith(surfer,powerup)); + // console.log(tilesWith(surfer,powerup)); getAll(powerup).forEach((powerupObj) => { powerupObj.remove(); }) diff --git a/games/RandomDungeon-final.js b/games/RandomDungeon-final.js index e7bb3acd3e..8db0817cfe 100644 --- a/games/RandomDungeon-final.js +++ b/games/RandomDungeon-final.js @@ -19,7 +19,7 @@ function random(min, max) { } -console.log("running") +// console.log("running") class Weapon { constructor(name, range, damage) { @@ -614,7 +614,7 @@ class Enemy { dungeon[y][x] = this.id this.x = x this.y = y - console.log(this.x, this.y) + // console.log(this.x, this.y) return } } @@ -643,7 +643,7 @@ class Enemy { // attempt to move towards player var x = this.x.valueOf() var y = this.y.valueOf() - console.log("moving", x, y) + // console.log("moving", x, y) if (this.y > playery) { y-- } else if (this.y < playery) { @@ -751,9 +751,9 @@ function playerAttack() { } } if (hit){ - console.log("hit enemy") + // console.log("hit enemy") } else { - console.log("could not target enemy") + // console.log("could not target enemy") } } diff --git a/games/Rythym.js b/games/Rythym.js index 3675265b9d..5561881a4c 100644 --- a/games/Rythym.js +++ b/games/Rythym.js @@ -331,7 +331,7 @@ function clearPoweredPads() { let ret = false; for(let i = 0; i < powered.length; i++) { let tile = getTile(powered[i].x, powered[i].y); - console.log(tile[0]); + // console.log(tile[0]); if(tile[0].type != poweredPad) { tile[0].remove(); score++; diff --git a/games/Snake.js b/games/Snake.js index 6de7e48afb..b7986d9ef9 100644 --- a/games/Snake.js +++ b/games/Snake.js @@ -291,7 +291,7 @@ function move() { } if (tilesWith(player, food).length != 0 || tilesWith(body, food).length != 0) { - console.log(tilesWith(player).length); + // console.log(tilesWith(player).length); placeFood(); score += 1; clearTile(getFirst(food).x, getFirst(food).y); diff --git a/games/Snake_Boxes.js b/games/Snake_Boxes.js index 224598ac8c..0a03a586c8 100644 --- a/games/Snake_Boxes.js +++ b/games/Snake_Boxes.js @@ -392,7 +392,7 @@ onInput("s", () => { keyPressed = "s"; } }); -console.log(keyPressed); +// console.log(keyPressed); const resetGame = () => { keyPressed = ""; @@ -417,7 +417,7 @@ const resetGame = () => { addSprite(tail.xPos, tail.yPos, green1); } }catch(error){ - console.log(error) + // console.log(error) } clearText() // Clearing all Text in playing Area score = 0; // Resetting Score diff --git a/games/Sort.js b/games/Sort.js index 95fe47889c..e122a7f62f 100644 --- a/games/Sort.js +++ b/games/Sort.js @@ -115,23 +115,23 @@ function runLoop() { } let rights = getAll(right); - console.log(rights); + // console.log(rights); let wrongs = getAll(wrong); - console.log(wrongs); + // console.log(wrongs); if(clicked == true){ if(rights[1] != undefined){ for (let i = 1; i < rights.length ; i++) { rights[i].remove(); - console.log(rights); + // console.log(rights); } clicked = false; } else if (wrongs[1] != undefined) { for (let i = 1; i < wrongs.length ; i++) { wrongs[i].remove(); - console.log(wrongs); + // console.log(wrongs); } clicked = false; } diff --git a/games/Space_Invasion.js b/games/Space_Invasion.js index 27ae692177..56ab7b1ff0 100644 --- a/games/Space_Invasion.js +++ b/games/Space_Invasion.js @@ -483,7 +483,7 @@ const collision = () =>{ if(getAll(eship)[0].y == getAll(laser)[0].y){ score += 1 - console.log("boom") + // console.log("boom") playTune(boom) clearInterval(y_laser) diff --git a/games/Sprigressbar.js b/games/Sprigressbar.js index a803c34e58..c5ef62180b 100644 --- a/games/Sprigressbar.js +++ b/games/Sprigressbar.js @@ -1489,7 +1489,7 @@ function check_segments(hhhh) { if (progress == 0) return progress -= 5 getTile(bar_pos.x + Math.floor(progress/10),bar_pos.y).forEach((the) => { - console.log(the.type) + // console.log(the.type) if (progress % 10){ if (the.type == beb || the.type == beo) the.remove() } else { diff --git a/games/The_Legend_Of_Sprig.js b/games/The_Legend_Of_Sprig.js index 60c8a01a51..8eeddc90e5 100644 --- a/games/The_Legend_Of_Sprig.js +++ b/games/The_Legend_Of_Sprig.js @@ -2454,16 +2454,16 @@ function UnlockOtherSide(x, y, c){ if(y == 1){ //Top nextMapY-- - console.log("Deleteing Rooms Up Top") + // console.log("Deleteing Rooms Up Top") }else if (x == width() - 1){ //Right nextMapX++ - console.log("Deleteing Rooms Too Right") + // console.log("Deleteing Rooms Too Right") }else if (y == height() - 1){ //Bottom nextMapY++ - console.log("Deleteing Rooms Down Below") + // console.log("Deleteing Rooms Down Below") }else if (x == 0){ //Left nextMapX-- - console.log("Deleteing Rooms Too Left") + // console.log("Deleteing Rooms Too Left") } //console.log("worldMap: " + worldX + " , " + worldY) @@ -2491,7 +2491,7 @@ function UnlockOtherSide(x, y, c){ } function CheckForItem(x, y){ - console.log("CHECKING FOR ITEM") + // console.log("CHECKING FOR ITEM") //console.log(getTile(x, y)[0]) //'h' = Red Key 'j' = Blue Key 'k' = yellow key @@ -2500,7 +2500,7 @@ function CheckForItem(x, y){ //heart if(getTile(x, y)[0]._type == 'l'){ - console.log("GOT HEART!") + // console.log("GOT HEART!") clearTile(x,y) if(playerHealth + heartRecovers > 100){ playerHealth = 100 @@ -2511,7 +2511,7 @@ function CheckForItem(x, y){ //pumpkin else if(getTile(x, y)[0]._type == '$'){ - console.log("GOT pumpkin!") + // console.log("GOT pumpkin!") clearTile(x,y) pumpkins++ //console.log("Current pumpkins: " + pumpkins) @@ -2521,27 +2521,27 @@ function CheckForItem(x, y){ //Keys else if(getTile(x, y)[0]._type == 'h'){ - console.log("RED KEY!") + // console.log("RED KEY!") redKey = true clearTile(x,y) levels[currentLevel].data.rKeyGrab = true }else if(getTile(x, y)[0]._type == 'j'){ - console.log("Blue KEY!") + // console.log("Blue KEY!") blueKey = true clearTile(x,y) levels[currentLevel].data.bKeyGrab = true }else if(getTile(x, y)[0]._type == 'k'){ - console.log("Yellow KEY!") + // console.log("Yellow KEY!") yellowKey = true clearTile(x,y) levels[currentLevel].data.yKeyGrab = true }else if(getTile(x, y)[0]._type == '['){ - console.log("Purple KEY!") + // console.log("Purple KEY!") purpleKey = true clearTile(x,y) levels[currentLevel].data.pKeyGrab = true }else if(getTile(x, y)[0]._type == ']'){ - console.log("Orange KEY!") + // console.log("Orange KEY!") orangeKey = true clearTile(x,y) levels[currentLevel].data.oKeyGrab = true @@ -2550,7 +2550,7 @@ function CheckForItem(x, y){ //Doors else if(getTile(x, y)[0]._type == 'd'){ - console.log("RED Door!") + // console.log("RED Door!") if(redKey){ var rDoors = tilesWith(rdoor) for (var i = 0; i < rDoors.length; i++) { @@ -2563,7 +2563,7 @@ function CheckForItem(x, y){ redKey = false } }else if(getTile(x, y)[0]._type == 'm'){ - console.log("Blue Door!") + // console.log("Blue Door!") if(blueKey){ var bDoors = tilesWith(bdoor) for (var i = 0; i < bDoors.length; i++) { @@ -2576,7 +2576,7 @@ function CheckForItem(x, y){ blueKey = false } }else if(getTile(x, y)[0]._type == 'g'){ - console.log("Yellow Door!") + // console.log("Yellow Door!") if(yellowKey){ var yDoors = tilesWith(ydoor) for (var i = 0; i < yDoors.length; i++) { @@ -2589,7 +2589,7 @@ function CheckForItem(x, y){ yellowKey = false } }else if(getTile(x, y)[0]._type == '{'){ - console.log("Purple Door!") + // console.log("Purple Door!") if(purpleKey){ var pDoors = tilesWith(pdoor) for (var i = 0; i < pDoors.length; i++) { @@ -2602,7 +2602,7 @@ function CheckForItem(x, y){ purpleKey = false } }else if(getTile(x, y)[0]._type == '}'){ - console.log("Orange Door!") + // console.log("Orange Door!") if(orangeKey){ var oDoors = tilesWith(odoor) for (var i = 0; i < oDoors.length; i++) { @@ -3238,12 +3238,12 @@ function CheckLevelData(levelNum){ //Set Player Spawn if(levelData.sX == 0 && levelData.sY == 0){ - console.log("Using Map Spawn") + // console.log("Using Map Spawn") } else{ clearTile(getFirst(player).x, getFirst(player).y) addSprite(levelData.sX, levelData.sY, player) - console.log("Spawn: ", levelData.sX, " : " , levelData.sY) + // console.log("Spawn: ", levelData.sX, " : " , levelData.sY) } } @@ -3284,12 +3284,12 @@ function GameOver(){ } function TheEnd(){ - console.log("YOU WON!!") + // console.log("YOU WON!!") gameStarted = false playerHealth = playerTotalHealth for (var i = 0; i < levels.length; i++) { - console.log(levels[i].data) + // console.log(levels[i].data) levels[i].data = new LevelData levels[i].ais = [] levels[i].aiLoaded = false diff --git a/games/The_Story_of_Grass.js b/games/The_Story_of_Grass.js index c8cd1ac866..ebb45a2c26 100644 --- a/games/The_Story_of_Grass.js +++ b/games/The_Story_of_Grass.js @@ -772,14 +772,14 @@ afterInput(() => { if (level == 0) { if(unmowedCounter >= totalGrass) { const cowPlacement = tilesWith(cow) - console.log(cowPlacement) + // console.log(cowPlacement) addSprite(cowPlacement[0][0]._x, cowPlacement[0][0]._y, mowed) addSprite(cowPlacement[0][0]._x, cowPlacement[0][0]._y, cow) unmowedCounter += 1 const grassEating = tilesWith(cow, mowed).length //cow dirt lvl 2 if (grassEating > 0) { const tile = tilesWith(cow, mowed) - console.log(tile) + // console.log(tile) clearTile(tile[0][0]._x, tile[0][0]._y) addSprite(tile[0][0]._x, tile[0][0]._y, cow) addSprite(tile[0][0]._x, tile[0][0]._y, dirt) @@ -812,7 +812,7 @@ afterInput(() => { const mowingGrass = tilesWith(lawnmower, unmowed).length if (mowingGrass > 0) { const tile = tilesWith(lawnmower, unmowed) - console.log(tile[0][0]._x) + // console.log(tile[0][0]._x) clearTile(tile[0][0]._x, tile[0][0]._y) addSprite(tile[0][0]._x, tile[0][0]._y, mowed) addSprite(tile[0][0]._x, tile[0][0]._y, lawnmower) diff --git a/games/Tic-Tac-No.js b/games/Tic-Tac-No.js index ff8f437a02..94b0aff441 100644 --- a/games/Tic-Tac-No.js +++ b/games/Tic-Tac-No.js @@ -175,7 +175,7 @@ const allEqual = arr => arr.every( v => v === arr[0] ) //Check if win function checkVic(){ for( let i = 0; i < 3; i++ ){ - console.log(board[i]) + // console.log(board[i]) if(board[i][0] != 0 && allEqual( board[i] )){ onVic(); break; @@ -234,13 +234,13 @@ function click(x, y){ turn = !turn; board[y][x] = 1; playTune(clickRed); - console.log(turn, x, y); + // console.log(turn, x, y); } else if(turn && board[y][x] == 0) { addSprite(x, y, crossblue); turn = !turn; board[y][x] = 1; - console.log(turn, x, y); + // console.log(turn, x, y); playTune(clickBlue); } checkVic(); diff --git a/games/Tron.js b/games/Tron.js index ca18608079..2a1c5c1158 100644 --- a/games/Tron.js +++ b/games/Tron.js @@ -362,13 +362,13 @@ const gameLoop1 = setInterval(() => { addSprite(getFirst(p1u).x, getFirst(p1u).y, stream1); getFirst(p1u).y -= 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } try { addSprite(getFirst(p2u).x, getFirst(p2u).y, stream2); getFirst(p2u).y -= 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } }, updateRate); @@ -377,13 +377,13 @@ const gameLoop2 = setInterval(() => { addSprite(getFirst(p1d).x, getFirst(p1d).y, stream1); getFirst(p1d).y += 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } try { addSprite(getFirst(p2d).x, getFirst(p2d).y, stream2); getFirst(p2d).y += 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } }, updateRate); @@ -392,13 +392,13 @@ const gameLoop3 = setInterval(() => { addSprite(getFirst(p1r).x, getFirst(p1r).y, stream1); getFirst(p1r).x += 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } try { addSprite(getFirst(p2r).x, getFirst(p2r).y, stream2); getFirst(p2r).x += 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } }, updateRate); @@ -407,13 +407,13 @@ const gameLoop4 = setInterval(() => { addSprite(getFirst(p1l).x, getFirst(p1l).y, stream1); getFirst(p1l).x -= 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } try { addSprite(getFirst(p2l).x, getFirst(p2l).y, stream2); getFirst(p2l).x -= 1; } catch (e) { - console.log("nope"); + // console.log("nope"); } }, updateRate); diff --git a/games/Virtual_Machine.js b/games/Virtual_Machine.js index 4bbd36aaf1..e7e2b7d9a8 100644 --- a/games/Virtual_Machine.js +++ b/games/Virtual_Machine.js @@ -426,7 +426,7 @@ afterInput(() => { if (check2 > 0) { level = 2 - console.log("Load trash"); + // console.log("Load trash"); const currentLevel = levels[level]; if (currentLevel !== "") { diff --git a/games/basketballgame.js b/games/basketballgame.js index a34f22e802..b1ae28c099 100644 --- a/games/basketballgame.js +++ b/games/basketballgame.js @@ -246,7 +246,7 @@ function Text(string,x,y,color) { Text("WASD to move.",4,0,color`2`) function onceMovedToExit() { - console.log("Stage 1 Completed.") + // console.log("Stage 1 Completed.") } onInput("w", () => { getFirst(player).y -= 1 @@ -272,16 +272,16 @@ onInput("j",() => { // }) afterInput(() => { if (tilesWith(player, resurrection_stone).length == 1) { - console.log("Unknown Level.") + // console.log("Unknown Level.") setMap(unknownLevels[0]); Text("Level: ???",0,0,color`2`); } }) afterInput(() => { - console.log("Stage Check") + // console.log("Stage Check") if (tilesWith(block,goal_point).length == 1) { - console.log('Alright. Stage is over. Moving on.') - console.log((levels[level + 1])) + // console.log('Alright. Stage is over. Moving on.') + // console.log((levels[level + 1])) setMap(levels[level + 1]) level = level + 1 onceMovedToExit() @@ -289,14 +289,14 @@ afterInput(() => { } else { - console.log("Stage Check Failed, conditions not met.") + // console.log("Stage Check Failed, conditions not met.") } if (tilesWith(player, spikes).length == 1 || tilesWith(player,enemy).length == 1) { - console.log("Death 💀"); + // console.log("Death 💀"); Text("You died!\nPress J to \nrestart.",5,7,color`2` ) var x = tilesWith(player)[0][0]['_x'] var y = tilesWith(player)[0][0]['_x'] - console.log(x,y) + // console.log(x,y) clearTile(tilesWith(player)[0][0]['_x'],tilesWith(player)[0][0]['_y']) addSprite(x,y,ghost_model) } diff --git a/games/bastion.js b/games/bastion.js index 3bf546ac9f..01b46f6e56 100644 --- a/games/bastion.js +++ b/games/bastion.js @@ -64,20 +64,20 @@ try { try { if(tilesWith(character,button).length == 1 || tilesWith(character2,button).length == 1) { // getFirst(blocked_door).y += 1 - console.log(getFirst(blocked_door)) - console.log(getFirst(blocked_door).remove()) + // console.log(getFirst(blocked_door)) + // console.log(getFirst(blocked_door).remove()) } // else { // getFirst(blocked_door).y -= 1 // } } catch (exceptionVar) { - console.log("Skipping Button Press.") + // console.log("Skipping Button Press.") } } function checkIfWaterBoyDied(level) { if (tilesWith(character,lava).length == 1 || tilesWith(character,green_goo).length == 1 || tilesWith(character,spikes).length == 1 || tilesWith(character,spikes_upsidedown).length == 1) { - console.log("Player 1(Waterboy) WASD died."); + // console.log("Player 1(Waterboy) WASD died."); getFirst(character).remove() text('Player 1 died!\nRestarting level in \n3 seconds.',0,6,color`2`) level = level @@ -88,10 +88,10 @@ try { } function checkIfLavaGirlDied(level) { if (tilesWith(character2,water).length == 1 || tilesWith(character2,green_goo).length == 1 || tilesWith(character2,spikes).length == 1 || tilesWith(character2,spikes_upsidedown).length == 1) { - console.log("Player 2(LavaGirl) IJKL died."); + // console.log("Player 2(LavaGirl) IJKL died."); getFirst(character2).remove() text('Player 2 died!\nRestarting level in \n3 seconds.',0,6,color`2`) - console.log(level) + // console.log(level) level = level setTimeout(() => {setMap(levels[level]); clearText()}, 3000) // level = level + 1 @@ -114,13 +114,13 @@ try { setTimeout(() => {getFirst(char).y +=1;},100) } catch (exceptionVar) { - console.log("Already dead, bypassing.") + // console.log("Already dead, bypassing.") } } } } catch (exceptionVar) { - console.log("Player is dead so..."); + // console.log("Player is dead so..."); } } @@ -664,7 +664,7 @@ wwwwwwwww`, //Sandbox Map fall(character) } catch (exceptionVar) { - console.log("No moving!") + // console.log("No moving!") } }) @@ -677,7 +677,7 @@ wwwwwwwww`, //Sandbox Map setTimeout((getFirst(character).y -= 1), 300); setTimeout(() => {fall(character); checkIfWaterBoyDied(level)}, 250); } catch (exceptionVar) { - console.log("No moving!") + // console.log("No moving!") } }) onInput("d", () => { @@ -685,7 +685,7 @@ wwwwwwwww`, //Sandbox Map getFirst(character).x += 1 setTimeout(() => {fall(character); checkIfWaterBoyDied(level)}, 1000); } catch (exceptionVar) { - console.log("No moving!") + // console.log("No moving!") } }) onInput("j", () => { @@ -694,7 +694,7 @@ wwwwwwwww`, //Sandbox Map setTimeout(() => {fall(character2); checkIfLavaGirlDied(level)}, 1000); } catch (exceptionVar) { - console.log("No moving!") + // console.log("No moving!") } }) onInput("i", () => { @@ -703,7 +703,7 @@ wwwwwwwww`, //Sandbox Map setTimeout((getFirst(character2).y -= 1), 200); setTimeout(() => {fall(character2); checkIfLavaGirlDied(level)}, 1000); } catch (exceptionVar) { - console.log("No moving!") + // console.log("No moving!") } }) // onInput("s", () => { @@ -715,7 +715,7 @@ wwwwwwwww`, //Sandbox Map fall(character2) } catch (exceptionVar) { - console.log("No moving!") + // console.log("No moving!") } }) @@ -758,11 +758,11 @@ wwwwwwwww`, //Sandbox Map getFirst(blocked_door_pushable).remove() } catch (exceptionVar) { - console.log("Something happened or door was removed.") + // console.log("Something happened or door was removed.") } } }) } catch (exceptionVar) { - console.log("Some error here.") + // console.log("Some error here.") } diff --git a/games/black_jack.js b/games/black_jack.js index 5c14121eae..d4ea6ecaeb 100644 --- a/games/black_jack.js +++ b/games/black_jack.js @@ -588,7 +588,7 @@ function drawCard(val, num, x, y) { function showHand(cards, is_dealer) { let i = 0; cards.forEach(card => { - console.log(card); + // console.log(card); drawCard(lookup[card[0]], card.slice(1), 4 * !is_dealer + i * 2, 1 + 3 * !is_dealer); i++; }) diff --git a/games/burger_build.js b/games/burger_build.js index e993a95b3b..03c68d3e3a 100644 --- a/games/burger_build.js +++ b/games/burger_build.js @@ -478,7 +478,7 @@ let win = false; function checkWin() { if (burgerLevels[level - 1].length !== collectedFood2.length) { win = false; - console.log("diff length") + // console.log("diff length") } for (let i = 0; i < burgerLevels[level - 1].length && i < collectedFood2.length; i++) { @@ -487,7 +487,7 @@ function checkWin() { } else { win = false; - console.log("diff ingredients") + // console.log("diff ingredients") break; } } @@ -504,11 +504,11 @@ function checkWin() { }); speed -= 100; if (level < 5) { - console.log("level is " + level) + // console.log("level is " + level) addText("press I", {x: 6, y: 11, color: color`L`}) level += 1; clearInterval(runGameInterval); - console.log(win) + // console.log(win) onInput("i", () => { if (win) { setLevel(); @@ -566,8 +566,8 @@ function gameLoop() { stackingFood(); if (collectedFood2.includes(topBun)) { - console.log(collectedFood2) - console.log("Finished") + // console.log(collectedFood2) + // console.log("Finished") checkWin(); } } diff --git a/games/catch_orpheus.js b/games/catch_orpheus.js index a40125a7a5..938c5d6d6f 100644 --- a/games/catch_orpheus.js +++ b/games/catch_orpheus.js @@ -94,25 +94,25 @@ setPushables({ onInput("s", () => { getFirst(player).y += 1 - console.log(Math.floor(Math.random() * 10) - 5) + // console.log(Math.floor(Math.random() * 10) - 5) getFirst(orpheus).y += Math.floor(Math.random() * 5) - 2 }); onInput("w", () => { getFirst(player).y -= 1 - console.log(Math.floor(Math.random() * 10) - 5) + // console.log(Math.floor(Math.random() * 10) - 5) getFirst(orpheus).y += Math.floor(Math.random() * 5) - 2 }); onInput("a", () => { getFirst(player).x -= 1 - console.log(Math.floor(Math.random() * 10) - 5) + // console.log(Math.floor(Math.random() * 10) - 5) getFirst(orpheus).x += Math.floor(Math.random() * 5) - 2 }); onInput("d", () => { getFirst(player).x += 1 - console.log(Math.floor(Math.random() * 10) - 5) + // console.log(Math.floor(Math.random() * 10) - 5) getFirst(orpheus).x += Math.floor(Math.random() * 5) - 2 }); diff --git a/games/chess.js b/games/chess.js index ba9777fbf8..d26cbf85a1 100644 --- a/games/chess.js +++ b/games/chess.js @@ -2009,7 +2009,7 @@ return exports; const chess = new Chess(); chess.move('e5') -console.log(chess); +// console.log(chess); function convertChessMove(row, col) { @@ -3464,7 +3464,7 @@ onInput("k", () => { if(currentBoard == newBoard) { playTune(noSound) } else { - console.log(chess.ascii()) + // console.log(chess.ascii()) } } if((selectedPosition != -1) && ((currentBoard != newBoard))) { @@ -3500,7 +3500,7 @@ afterInput(() => { }) } else if(chess.in_threefold_repetition()) { - console.log("MATE") + // console.log("MATE") addText("Threefold repetition", { color: color`2` }) diff --git a/games/color_patterns.js b/games/color_patterns.js index 31b25115e5..37132174de 100644 --- a/games/color_patterns.js +++ b/games/color_patterns.js @@ -165,7 +165,7 @@ onInput("k", _ => { afterInput(_ => { if(checkResult()){ - console.log('done'); + // console.log('done'); nextLevel(); } }) diff --git a/games/connect_four.js b/games/connect_four.js index 73b4072ee4..8800ff2f15 100644 --- a/games/connect_four.js +++ b/games/connect_four.js @@ -276,7 +276,7 @@ const win = () => { color: color`0` }); }; - console.log(`${turn} Wins!`) + // console.log(`${turn} Wins!`) } const checkWin = () => { diff --git a/games/cookie_clicker.js b/games/cookie_clicker.js index e30eea8be5..ad8217f65d 100644 --- a/games/cookie_clicker.js +++ b/games/cookie_clicker.js @@ -395,7 +395,7 @@ onInput("i", () => { let price = calculatePrice(cpsOwned + 1,2) if(money >= price) { cpsOwned += 1; - console.log(price); + // console.log(price); money -= price; playTune(buy); } @@ -405,7 +405,7 @@ onInput("k", () => { let price = calculatePrice(cpcOwned + 1,1) if(money >= price) { cpcOwned += 1; - console.log(price); + // console.log(price); money -= price; playTune(buy); } diff --git a/games/cubefield.js b/games/cubefield.js index 7e13b7aefe..1b5204b67c 100644 --- a/games/cubefield.js +++ b/games/cubefield.js @@ -255,12 +255,12 @@ function tick() { return; } - console.log(getAll()); + // console.log(getAll()); for (let currentEnemy of getAll()) { if (isNaN(currentEnemy._type)) continue; - console.log(currentEnemy); + // console.log(currentEnemy); if ((currentEnemy.y + 1) === height()) { clearTile(currentEnemy.x, currentEnemy.y); diff --git a/games/desi-pong.js b/games/desi-pong.js index 7dc8bca84d..1b650fc59f 100644 --- a/games/desi-pong.js +++ b/games/desi-pong.js @@ -208,7 +208,7 @@ onInput("d", () => { ballDx = Math.random() < 0.5 ? -1 : 1; ballDy = Math.random() < 0.5 ? -2 : 2; }, 1000); - console.log("Game Restarted"); + // console.log("Game Restarted"); }); setPushables({ diff --git a/games/ding_dong-delivery.js b/games/ding_dong-delivery.js index 4445526999..31ccc3a6d7 100644 --- a/games/ding_dong-delivery.js +++ b/games/ding_dong-delivery.js @@ -311,7 +311,7 @@ afterInput(() => { playTune(bell) //pause script for 1 sec setTimeout(() => { - console.log("This will have the 1 second delay."); + // console.log("This will have the 1 second delay."); // increase the current level number level += 1; @@ -324,7 +324,7 @@ afterInput(() => { playTune(win) } }, 1000); - console.log("This will not have the delay.") + // console.log("This will not have the delay.") } getAll(pothole).forEach((obj) => { if(getFirst(box).x == obj.x && getFirst(box).y == obj.y){ diff --git a/games/fire_boom.js b/games/fire_boom.js index 537841bae5..e48c5590e2 100644 --- a/games/fire_boom.js +++ b/games/fire_boom.js @@ -249,7 +249,7 @@ function startTimer() { var gameLoop = setInterval(() => { - console.log("Game loop is running"); + // console.log("Game loop is running"); // Step 4 - Add all game functions despawnfire(); movefire(); diff --git a/games/flappy_bird_but_no_gravity_and_worse.js b/games/flappy_bird_but_no_gravity_and_worse.js index fb9ea92623..720391cd8b 100644 --- a/games/flappy_bird_but_no_gravity_and_worse.js +++ b/games/flappy_bird_but_no_gravity_and_worse.js @@ -134,7 +134,7 @@ function gameLoop() { function lost() { isGameOver = true; - console.log("You lost"); + // console.log("You lost"); setMap(map` ........ ........ diff --git a/games/flappysprig.js b/games/flappysprig.js index fed91b8880..febe41d5fc 100644 --- a/games/flappysprig.js +++ b/games/flappysprig.js @@ -354,7 +354,7 @@ function resetintervals() { point += 1 } // Show Points at the right of the screen - console.log(point) + // console.log(point) let pointstring = point.toString() clearText() addText(pointstring, { @@ -362,7 +362,7 @@ function resetintervals() { y: 1, color: color`0` }) - console.log(playerx,playery) + // console.log(playerx,playery) if (getTile(playerx, playery)[1]) { // Make the game over screen appears clearText() diff --git a/games/floppyMatch.js b/games/floppyMatch.js index 600e09d513..0399cbeabf 100644 --- a/games/floppyMatch.js +++ b/games/floppyMatch.js @@ -341,9 +341,9 @@ onInput("d", () => { if (ind > 5) { ind = 5 } - console.log(ind) + // console.log(ind) } catch (error) { - console.log("ignored") + // console.log("ignored") } @@ -380,10 +380,10 @@ onInput("a", () => { if (ind < 0) { ind = 0 } - console.log(ind) + // console.log(ind) } catch (error) { - console.log("ignored a") + // console.log("ignored a") } @@ -397,8 +397,8 @@ onInput("i", () => { chosenimes += 1 if (chosenimes == 2) { - console.log(chosen) - console.log(onesTheyChose) + // console.log(chosen) + // console.log(onesTheyChose) //much more efficient way to doing this, checking if lisrts are equal has more edge case detetion with larger lists, but can jnust check if for each ithing in lis tif it exists on the other, nette rthan this big ifc loop if ((chosen[0] === onesTheyChose[0] && chosen[1] === onesTheyChose[1]) || (chosen[1] === onesTheyChose[0] && chosen[0] === onesTheyChose[1])) { playTune(right) @@ -419,7 +419,7 @@ onInput("i", () => { } else { - console.log("rip") + // console.log("rip") wrongs += 1 totalMess += 1 diff --git a/games/fogged.js b/games/fogged.js index dabb1aae12..513f231b29 100644 --- a/games/fogged.js +++ b/games/fogged.js @@ -116,7 +116,7 @@ function changeMap(){ } } - console.log(final) + // console.log(final) return map`${final}`; } diff --git a/games/galloping.js b/games/galloping.js index 1dbdf39e70..67a18d772a 100644 --- a/games/galloping.js +++ b/games/galloping.js @@ -544,7 +544,7 @@ let gameloop = setInterval(() => { }, 0); function setLevel(newLevel) { - console.log(newLevel); + // console.log(newLevel); isRunning = false; level = newLevel; clearText(); diff --git a/games/generic_dungeon_crawler.js b/games/generic_dungeon_crawler.js index c4a5ce7451..49880cbb2a 100644 --- a/games/generic_dungeon_crawler.js +++ b/games/generic_dungeon_crawler.js @@ -1630,7 +1630,7 @@ function next_map(){ [npcs,objs] = generate_npcs_objs(mar,area); shop = generate_shop(area); // console.log(shop); - console.log(print_bmp(mar)); + // console.log(print_bmp(mar)); setMap(make_display(player.x-W/2,player.y-H/2)); draw_texts(); diff --git a/games/gravity_box.js b/games/gravity_box.js index bc1e6681a0..9dfe07ab95 100644 --- a/games/gravity_box.js +++ b/games/gravity_box.js @@ -231,7 +231,7 @@ afterInput(() => { */ - console.log("doesn't really do anything that cool"); + // console.log("doesn't really do anything that cool"); }) // gravity stuff diff --git a/games/hex_hubbub.js b/games/hex_hubbub.js index 3b3cee42e0..8b7971db4a 100644 --- a/games/hex_hubbub.js +++ b/games/hex_hubbub.js @@ -400,7 +400,7 @@ var current = 0b0000; function renderSegments(num) { let goal = goals[goalI]; - console.log(goal); + // console.log(goal); // a: top clearTile(2, 0); diff --git a/games/hidden_maze.js b/games/hidden_maze.js index 63af9a6b12..4186b15aa8 100644 --- a/games/hidden_maze.js +++ b/games/hidden_maze.js @@ -202,7 +202,7 @@ setPushables({ afterInput(() => { if (level != levels.length -1 && (getFirst(goal).y == getFirst(player).y && getFirst(goal).x == getFirst(player).x)) { - console.log("you win") + // console.log("you win") level += 1 setMap(levels[level]) if (level == levels.length-1){ @@ -230,7 +230,7 @@ onInput("w", () => { } }) -console.log("01000100 01100101 01100001 01110010 00100000 01100110 01110010 01101001 01100101 01101110 01100100 00101100 00001010 01001001 00100000 01100001 01101101 00100000 01101001 01101110 01110110 01101001 01110100 01101001 01101110 01100111 00100000 01111001 01101111 01110101 00100000 01110100 01101111 00100000 01101101 01111001 00100000 01101110 01100101 01110111 00100000 01101101 01100001 01111010 01100101 00101100 00100000 01110100 01110010 01111001 00100000 01101110 01101111 01110100 00100000 01110100 01101111 00100000 01100111 01100101 01110100 00100000 01110011 01110100 01110101 01100011 01101011 00101100 00100000 01101101 01100001 01101011 01100101 00100000 01110011 01110101 01110010 01100101 00100000 01110100 01101111 00100000 01101000 01100001 01110110 01100101 00100000 01100110 01110101 01101110 00100001") +// console.log("01000100 01100101 01100001 01110010 00100000 01100110 01110010 01101001 01100101 01101110 01100100 00101100 00001010 01001001 00100000 01100001 01101101 00100000 01101001 01101110 01110110 01101001 01110100 01101001 01101110 01100111 00100000 01111001 01101111 01110101 00100000 01110100 01101111 00100000 01101101 01111001 00100000 01101110 01100101 01110111 00100000 01101101 01100001 01111010 01100101 00101100 00100000 01110100 01110010 01111001 00100000 01101110 01101111 01110100 00100000 01110100 01101111 00100000 01100111 01100101 01110100 00100000 01110011 01110100 01110101 01100011 01101011 00101100 00100000 01101101 01100001 01101011 01100101 00100000 01110011 01110101 01110010 01100101 00100000 01110100 01101111 00100000 01101000 01100001 01110110 01100101 00100000 01100110 01110101 01101110 00100001") onInput("a", () => { diff --git a/games/hidden_maze_escape.js b/games/hidden_maze_escape.js index 6ffe79fe0b..3184a35845 100644 --- a/games/hidden_maze_escape.js +++ b/games/hidden_maze_escape.js @@ -337,7 +337,7 @@ setPushables({ afterInput(() => { if (level != levels.length -1 && areTouching(player, goal)) { - console.log("you die") + // console.log("you die") level += 1 setMap(levels[level]) if (level == levels.length-1){ @@ -353,7 +353,7 @@ afterInput(() => { setMap(hiddenLvls[level]) } if (areTouching(block, blockGoal)){ - console.log("here") + // console.log("here") level +=1 hLvlsDone +=1 setMap(levels[level]) diff --git a/games/infinite_maze.js b/games/infinite_maze.js index 332a99c928..3390db214a 100644 --- a/games/infinite_maze.js +++ b/games/infinite_maze.js @@ -183,15 +183,15 @@ function generateEmptyMaze(wi, hi) { let blank = blanks.split(""); let rows = "w.".repeat(wi) + "w"; let row = rows.split(""); - console.log("blank", blank); - console.log("row", row); + // console.log("blank", blank); + // console.log("row", row); let maze = []; for (let i=0; i { if (tilesWith(player, goal).length) { mapa = mazeGeneration(4+score, 4+score); score += 1; - console.log(mapa); + // console.log(mapa); setMap(mapa); clearText(); addText("Score: " + score, { diff --git a/games/kindless.js b/games/kindless.js index 83464b1b81..7233bf2e5f 100644 --- a/games/kindless.js +++ b/games/kindless.js @@ -444,7 +444,7 @@ setInterval(() => { pos = getFirst(player).y; velocity = 0; } - console.log(pos) + // console.log(pos) if (Math.round(pos) === 13 && velocity > 0) { // ground, going down velocity = 0; } @@ -466,7 +466,7 @@ setInterval(() => { // let score = 90 setInterval(() => { let velocityMsg = round(-velocity*10) + " " + round(hvelocity*10); - console.log(-velocity, velocityMsg); + // console.log(-velocity, velocityMsg); // textWrite(9, 1, score + ""); clearText(); addText(velocityMsg, {y: 0, color:color`2`}) diff --git a/games/mailman.js b/games/mailman.js index af2545d634..56fce2805f 100644 --- a/games/mailman.js +++ b/games/mailman.js @@ -318,7 +318,7 @@ afterInput(() => { // increase the current level number level = level + 1; const currentLevel = levels[level]; - console.log(level); + // console.log(level); // make sure the level exists and if so set the map // otherwise, we have finished the last level, there is no level // after the last level @@ -339,8 +339,8 @@ function checkHit() { if (baddamage > 0) { // You're being hit - console.log("evilHIT!"); - console.log(evildamage); + // console.log("evilHIT!"); + // console.log(evildamage); setMap(currentLevelMap); // Reset the current level } } @@ -361,6 +361,6 @@ function checkHit() { if (badBoxDamage > 0 || evilBoxDamage > 0) { // You're being hit by either BADBOX or EVILBOX setMap(currentLevelMap); // Reset the current level - console.log("HIT!"); + // console.log("HIT!"); } } diff --git a/games/mini_maze_and_puzzle.js b/games/mini_maze_and_puzzle.js index 76bceecf88..f93d316047 100644 --- a/games/mini_maze_and_puzzle.js +++ b/games/mini_maze_and_puzzle.js @@ -600,7 +600,7 @@ onInput("j", () => { onInput("k", () => { const currentLevel = levels[0]; - console.log(levels[level]); + // console.log(levels[level]); if (currentLevel !== undefined) { clearText(""); setMap(currentLevel); @@ -639,7 +639,7 @@ afterInput(() => { } else { const currentLevelCheck = levels[level]; if(currentLevelCheck == levels[5]){ - console.log("test") + // console.log("test") addSprite(uBarrierX, uBarrierY, barrier); button_status="unpressed"; } diff --git a/games/offline_t-rex_game.js b/games/offline_t-rex_game.js index 0c6ff5bdd0..a203571497 100644 --- a/games/offline_t-rex_game.js +++ b/games/offline_t-rex_game.js @@ -180,7 +180,7 @@ function gameLoop() { function lost() { gameOver = true; - console.log("You lost"); + // console.log("You lost"); setMap(map` ssssss ssssss diff --git a/games/orbit_blaster.js b/games/orbit_blaster.js index a269bb5568..7ea21a5a67 100644 --- a/games/orbit_blaster.js +++ b/games/orbit_blaster.js @@ -271,10 +271,10 @@ let moveObstacleInterval; function startGame() { - console.log('srart game working ') + // console.log('srart game working ') FIRSTSTART = true if (GAMESTARTED) { - console.log('srart game ') + // console.log('srart game ') clearText() addSprite(1, 8, player); moveBulletsInterval = setInterval(moveBullets, 50); diff --git a/games/osu-mania.js b/games/osu-mania.js index 9d9ca01c78..7644c6db79 100644 --- a/games/osu-mania.js +++ b/games/osu-mania.js @@ -282,7 +282,7 @@ function placeRowOfNotes(beatmapNum, row) { const beatmap = beatmaps[beatmapNum]; let notes = beatmap.split("\n"); notes.reverse(); - console.log(notes); + // console.log(notes); for (let noteIndex=0;noteIndex<4;noteIndex++) { if (notes[row].charAt(noteIndex) == "0") { // random chance to spawn in an Amogus instead of normal note sprite diff --git a/games/plants_vs_zombies.js b/games/plants_vs_zombies.js index e826e8b8c8..a120e2f553 100644 --- a/games/plants_vs_zombies.js +++ b/games/plants_vs_zombies.js @@ -949,7 +949,7 @@ function Game() { addText(String(this.amount), { x: 0, y: 0, color: color`6` }) addText(String(this.score), { x: 19, y: 0, color: color`4` }) } catch (err) { - console.log('Found the error!', err) + // console.log('Found the error!', err) } }, cleanup: function (text, x, y) { @@ -1081,7 +1081,7 @@ let gameloop = setInterval(() => { if (zombieCount >= newZombie) { zombieCount = 0 const pos = [width() - 1, random(1, height() - 2)] - console.log(pos) + // console.log(pos) const newZombie = Zombie(...pos) addSprite(newZombie.x, newZombie.y, newZombie.letter) game.zombieSprites.push(newZombie) diff --git a/games/pong-multiplayer.js b/games/pong-multiplayer.js index 1cace318f5..39b3219afb 100644 --- a/games/pong-multiplayer.js +++ b/games/pong-multiplayer.js @@ -235,7 +235,7 @@ setInterval(() => { ballX = Math.abs(ballX); } } catch(e) { - console.log(e) + // console.log(e) } }, 60) // Scoring diff --git a/games/racer.js b/games/racer.js index 12ce38a3e3..d06cb4606c 100644 --- a/games/racer.js +++ b/games/racer.js @@ -300,13 +300,13 @@ setInterval(() => { let lastTime = Date.now() setInterval(() => { - console.log(lastTime) + // console.log(lastTime) if (!hasLost && raceStarted <= -1 && Date.now() - lastTime >= levelSpeeds[level] && level > 1) { getFirst(player).y -= 1; checkWin() lastTime = Date.now() - console.log("inside", lastTime) + // console.log("inside", lastTime) } }, 100) diff --git a/games/reversi.js b/games/reversi.js index 36f3aef277..a799986132 100644 --- a/games/reversi.js +++ b/games/reversi.js @@ -67,7 +67,7 @@ const game = { /** Play at (x,y) */ play(x, y) { - console.log("play", x, y, this.player, this.getScore(x, y, this.player)); + // console.log("play", x, y, this.player, this.getScore(x, y, this.player)); if (this.getScore(x, y, this.player) === 0) return false; this.board[x][y] = this.player; this.score[this.player]++; @@ -397,7 +397,7 @@ function startGame() { } async function gameOnKey(key) { - console.log(key); + // console.log(key); if (key == "w") { if (cursor.y > 0) cursor.y--; } else if (key == "s") { @@ -421,7 +421,7 @@ async function gameOnKey(key) { }, 500); }); if(game.player != 1){ - console.log("bug"); + // console.log("bug"); break; } game.play(...game.bestMove()); diff --git a/games/shitpest.js b/games/shitpest.js index c20f3d0e25..4f6cb0e67d 100644 --- a/games/shitpest.js +++ b/games/shitpest.js @@ -252,7 +252,7 @@ function spawnEnemies() { addSprite(4, 0, enemy) break default: - console.log(chance) + // console.log(chance) } } diff --git a/games/silicon-valley-obby.js b/games/silicon-valley-obby.js index 8e7afaf264..b2e9410cf8 100644 --- a/games/silicon-valley-obby.js +++ b/games/silicon-valley-obby.js @@ -1125,7 +1125,7 @@ onInput("i", () => { setTimeout((getFirst(player).y -= 1), 1000); setTimeout(() => {fall(player); richardDied(level)}, 250); } catch (exceptionVar) { - console.log("not moving") + // console.log("not moving") } }); @@ -1135,7 +1135,7 @@ onInput("a", () => { fall(player) } catch (exceptionVar) { - console.log("not moving") + // console.log("not moving") } }); @@ -1144,7 +1144,7 @@ onInput("d", () => { getFirst(player).x += 1 setTimeout(() => {fall(player); richardDied(level)}, 100); } catch (exceptionVar) { - console.log("not moving") + // console.log("not moving") } }); diff --git a/games/snake_game.js b/games/snake_game.js index 29427de8d0..3527068ea5 100644 --- a/games/snake_game.js +++ b/games/snake_game.js @@ -321,7 +321,7 @@ onInput("s", () => { keyPressed = "s"; } }); -console.log(keyPressed); +// console.log(keyPressed); const resetGame = () => { keyPressed = ""; diff --git a/games/sudoku.js b/games/sudoku.js index c1e0db4bef..7b6e28e029 100644 --- a/games/sudoku.js +++ b/games/sudoku.js @@ -1146,7 +1146,7 @@ const sudokuJS = () => { } } - console.log(display_string); + // console.log(display_string); }; sudoku.validate_board = function(board){ diff --git a/games/sweepar.js b/games/sweepar.js index 50841dbda5..319ac82177 100644 --- a/games/sweepar.js +++ b/games/sweepar.js @@ -233,14 +233,14 @@ const openSquare = () => { if (gameGrid[cursorY][cursorX] === bomb) { // Handle bomb hit (game over logic) addSprite(cursorX, cursorY, bomb); - console.log("Game over! You hit a bomb."); + // console.log("Game over! You hit a bomb."); gameover(); } else if (gameGrid[cursorY][cursorX] === flag) { // Handle unflagging logic clearTile(cursorX, cursorY); addSprite(cursorX, cursorY, normal); addSprite(cursorX, cursorY, cursor); - console.log("Square unflagged."); + // console.log("Square unflagged."); } else if (gameGrid[cursorY][cursorX] === normal) { // Handle opening logic const adjacentBombs = countAdjacentBombs(cursorX, cursorY); @@ -253,7 +253,7 @@ const openSquare = () => { addSprite(cursorX, cursorY, open); } addSprite(cursorX, cursorY, cursor); - console.log("Square opened."); + // console.log("Square opened."); checkWin(); // Call the checkWin function after opening a square } }; @@ -317,13 +317,13 @@ const flagSquare = () => { if (gameGrid[cursorY][cursorX] === normal || gameGrid[cursorY][cursorX] === bomb) { addSprite(cursorX, cursorY, flag); gameGrid[cursorY][cursorX] = flag; - console.log("Square flagged."); + // console.log("Square flagged."); } else if (gameGrid[cursorY][cursorX] === flag) { clearTile(cursorX,cursorY); addSprite(cursorX,cursorY,normal); addSprite(cursorX,cursorY,cursor); gameGrid[cursorY][cursorX] = normal; - console.log("Flag removed."); + // console.log("Flag removed."); } }; diff --git a/games/the_impossible_puzzle.js b/games/the_impossible_puzzle.js index 18899094dd..9ca1a95367 100644 --- a/games/the_impossible_puzzle.js +++ b/games/the_impossible_puzzle.js @@ -348,7 +348,7 @@ if (!solvable) { puzzle.push(16); -console.log(puzzle) +// console.log(puzzle) let puzzleIdx = 0; let mapStr = "" @@ -359,7 +359,7 @@ for (let i = 0; i < 4; i++) { } mapStr += "\n"; } -console.log(mapStr); +// console.log(mapStr); setMap(map`${mapStr}`); @@ -410,8 +410,8 @@ afterInput(async () => { for (let x = 0; x < 4; x++) { const t = getTile(x, y); if (t.length && t[0].type != tiles[tileIdx]) { - console.log("got type", t[0].type) - console.log('expected', tiles[tileIdx]) + // console.log("got type", t[0].type) + // console.log('expected', tiles[tileIdx]) return } tileIdx++; diff --git a/games/the_invisible_man.js b/games/the_invisible_man.js index 9e01fb4388..1cac0008c3 100644 --- a/games/the_invisible_man.js +++ b/games/the_invisible_man.js @@ -119,11 +119,11 @@ afterInput(() => { //Debug stuff, I'll leave this in in case someone playing from the browser wants it afterInput(() => { - console.log("playery "+playery); - console.log("playery "+playerx); - console.log("coinx "+coiny); - console.log("coinx "+coinx); - console.log("--------------------"); + // console.log("playery "+playery); + // console.log("playery "+playerx); + // console.log("coinx "+coiny); + // console.log("coinx "+coinx); + // console.log("--------------------"); }) diff --git a/games/the_journey_of_the_box_a_sokoban_saga.js b/games/the_journey_of_the_box_a_sokoban_saga.js index c1d1ba12a1..1007c08fea 100644 --- a/games/the_journey_of_the_box_a_sokoban_saga.js +++ b/games/the_journey_of_the_box_a_sokoban_saga.js @@ -272,8 +272,8 @@ afterInput(() => { const buttonNumber = tilesWith(button).length; const Coveredbuttons = tilesWith(button, box).length; const wallTiles = tilesWith(wall); - console.log("buttonNumber", buttonNumber); - console.log("Coveredbuttons", Coveredbuttons); + // console.log("buttonNumber", buttonNumber); + // console.log("Coveredbuttons", Coveredbuttons); //check level buttons if (level == 5) { if (buttonNumber === Coveredbuttons){ diff --git a/games/tictactoe.js b/games/tictactoe.js index 5292c0e4a8..af6230e1b6 100644 --- a/games/tictactoe.js +++ b/games/tictactoe.js @@ -129,7 +129,7 @@ function checkForWinner(tiles) { } function winner(type) { - console.log(`${type} wins!`); + // console.log(`${type} wins!`); finished = true; setMap(map` .......... @@ -284,6 +284,6 @@ onInput("d", () => { }) afterInput(() => { - console.log(currentTurn) + // console.log(currentTurn) checkForWinner(allTiles); }); diff --git a/games/uav.js b/games/uav.js index 0dc2c86e4a..9594cbc517 100644 --- a/games/uav.js +++ b/games/uav.js @@ -154,7 +154,7 @@ const spawnLoop = setTimeout(fireUav, freq) let updateCount = 0 const updateLoop = setInterval(() => { - console.log("update loop", paused); + // console.log("update loop", paused); const t = tilesWith(uav) getAll(uav).forEach(u => { u.y++ diff --git a/games/wham.js b/games/wham.js index ba0564a807..c6e45353a3 100644 --- a/games/wham.js +++ b/games/wham.js @@ -295,7 +295,7 @@ onInput("s", () => { } addText(vertical_cursor.toString(), {x: 15, y: 4, color: color`3`}) - console.log(current_screen.flat().join("")) + // console.log(current_screen.flat().join("")) const levels = [current_screen.flat().join("")]; const currentLevel = levels[level]; setMap(currentLevel);}