endGame() {
    if (this.xPos <= 0 || this.yPos <= 0 || this.xPos + 80 >= width || this.yPos + 80 >= height) {
      return true;
    }
    return false;
  }
// Boolean to check if the game end or not
Boolean to check if the game end or not
Boolean to check if the game end or not
endGame() {
    if (this.xPos <= 0 || this.yPos <= 0 || this.xPos + 80 >= width || this.yPos + 80 >= height) {
      return true;
    }
    return false;
  }
endGame ( ) { if ( this . xPos <= 0 || this . yPos <= 0 || this . xPos + 80 >= width || this . yPos + 80 >= height ) { return true ; } return false ; }
Boolean to check if the game end or not
Boolean to check if the game end or not