src/games/snakeGame/level1/services/logic.js
//this will be called if user quit the game or loss the game
this will be called if user quit the game or loss the game
this will be called if user quit the game or loss the game
gameOver() {
        clearInterval(this.game);
        this.ctx.fillStyle = "red";
        this.ctx.font = "50px Changa one";
        this.ctx.fillText("GAME OVER!", 25, Math.floor(this.MAX_HEIGHT / 2) * this.box);
        this.dead.play();
    }
gameOver ( ) { clearInterval ( this . game ) ; this . ctx . fillStyle = "red" ; this . ctx . font = "50px Changa one" ; this . ctx . fillText ( "GAME OVER!" , 25 , Math . floor ( this . MAX_HEIGHT / 2 ) * this . box ) ; this . dead . play ( ) ; }
this will be called if user quit the game or loss the game
this will be called if user quit the game or loss the game