build/app.js
/**
   * Adds HTML elements to draw on the webpage by iterating through the 2D maze array
   * @param {Array} mazeArray - 2D array representing the game board
   * @param {Array} entityList - List of entities to be used throughout the game
   */
Adds HTML elements to draw on the webpage by iterating through the 2D maze array
@param {Array} mazeArray - 2D array representing the game board
@param {Array} entityList - List of entities to be used throughout the game
Adds HTML elements to draw on the webpage by iterating through the 2D maze array @param { Array } mazeArray - 2D array representing the game board @param { Array } entityList - List of entities to be used throughout the game
drawMaze(mazeArray, entityList) {
    this.pickups = [this.fruit];
    this.mazeDiv.style.height = `${this.scaledTileSize * 31}px`;
    this.mazeDiv.style.width = `${this.scaledTileSize * 28}px`;
    this.gameUi.style.width = `${this.scaledTileSize * 28}px`;
    this.bottomRow.style.minHeight = `${this.scaledTileSize * 2}px`;
    this.dotContainer = document.getElementById('dot-container');
    mazeArray.forEach((row, rowIndex) => {
      row.forEach((block, columnIndex) => {
        if (block === 'o' || block === 'O') {
          const type = block === 'o' ? 'pacdot' : 'powerPellet';
          const points = block === 'o' ? 10 : 50;
          const dot = new Pickup(
            type,
            this.scaledTileSize,
            columnIndex,
            rowIndex,
            this.pacman,
            this.dotContainer,
            points,
          );
          entityList.push(dot);
          this.pickups.push(dot);
          this.remainingDots += 1;
        }
      });
    });
  }
drawMaze ( mazeArray , entityList ) { this . pickups = [ this . fruit ] ; this . mazeDiv . style . height = ` ${ this . scaledTileSize * 31 } ` ; this . mazeDiv . style . width = ` ${ this . scaledTileSize * 28 } ` ; this . gameUi . style . width = ` ${ this . scaledTileSize * 28 } ` ; this . bottomRow . style . minHeight = ` ${ this . scaledTileSize * 2 } ` ; this . dotContainer = document . getElementById ( 'dot-container' ) ; mazeArray . forEach ( ( row , rowIndex ) => { row . forEach ( ( block , columnIndex ) => { if ( block === 'o' || block === 'O' ) { const type = block === 'o' ? 'pacdot' : 'powerPellet' ; const points = block === 'o' ? 10 : 50 ; const dot = new Pickup ( type , this . scaledTileSize , columnIndex , rowIndex , this . pacman , this . dotContainer , points , ) ; entityList . push ( dot ) ; this . pickups . push ( dot ) ; this . remainingDots += 1 ; } } ) ; } ) ; }
Adds HTML elements to draw on the webpage by iterating through the 2D maze array
 @param {Array} mazeArray - 2D array representing the game board
 @param {Array} entityList - List of entities to be used throughout the game
Adds HTML elements to draw on the webpage by iterating through the 2D maze array @param { Array } mazeArray - 2D array representing the game board @param { Array } entityList - List of entities to be used throughout the game