build/app.js
/**
   * Sets the ghost's mode to SCARED, turns the ghost around,
   * and changes spritesheets accordingly
   */
Sets the ghost's mode to SCARED, turns the ghost around,
and changes spritesheets accordingly
Sets the ghost ' s mode to SCARED turns the ghost around and changes spritesheets accordingly
becomeScared() {
    const gridPosition = this.characterUtil.determineGridPosition(
      this.position, this.scaledTileSize,
    );
    if (this.mode !== 'eyes') {
      if (!this.isInGhostHouse(gridPosition) && this.mode !== 'scared') {
        this.direction = this.characterUtil.getOppositeDirection(
          this.direction,
        );
      }
      this.mode = 'scared';
      this.scaredColor = 'blue';
      this.setSpriteSheet(this.name, this.direction, this.mode);
    }
  }
becomeScared ( ) { const gridPosition = this . characterUtil . determineGridPosition ( this . position , this . scaledTileSize , ) ; if ( this . mode !== 'eyes' ) { if ( ! this . isInGhostHouse ( gridPosition ) && this . mode !== 'scared' ) { this . direction = this . characterUtil . getOppositeDirection ( this . direction , ) ; } this . mode = 'scared' ; this . scaredColor = 'blue' ; this . setSpriteSheet ( this . name , this . direction , this . mode ) ; } }
Sets the ghost's mode to SCARED, turns the ghost around,
 and changes spritesheets accordingly
Sets the ghost ' s mode to SCARED turns the ghost around and changes spritesheets accordingly