fungi-inventory.js
/*
  Separation of sell and getTotalValue allows not only for readability, but
  also for easier modifications of both - i.e. selling the inventory may
  take time or even cost gold. These functionalities can be added here.
  */
Separation of sell and getTotalValue allows not only for readability, but
also for easier modifications of both - i.e. selling the inventory may
take time or even cost gold. These functionalities can be added here.
Separation of sell and getTotalValue allows not only for readability but also for easier modifications of both - i . e . selling the inventory may take time or even cost gold . These functionalities can be added here .
sell (
    mushroomTable,
    stageBonusExponent,
    sameTypeBonusMultiplier,
    sameStageBonusMultiplier,
    tricolorBonus)
    {
    if (!this.isFull()) {
      return false
    }
    else {
      let sellValue = this.getTotalValue(
        mushroomTable,
        stageBonusExponent,
        sameTypeBonusMultiplier,
        sameStageBonusMultiplier,
        tricolorBonus)
      this.empty()
      return sellValue
    }
  }
sell ( mushroomTable , stageBonusExponent , sameTypeBonusMultiplier , sameStageBonusMultiplier , tricolorBonus ) { if ( ! this . isFull ( ) ) { return false } else { let sellValue = this . getTotalValue ( mushroomTable , stageBonusExponent , sameTypeBonusMultiplier , sameStageBonusMultiplier , tricolorBonus ) this . empty ( ) return sellValue } }
Separation of sell and getTotalValue allows not only for readability, but
also for easier modifications of both - i.e.
Separation of sell and getTotalValue allows not only for readability but also for easier modifications of both - i . e .