Esempio n. 1
0
        public void UpdatePrice()
        {
            MassiveNumber tempNum = new MassiveNumber();

            tempNum.value   = initPrice.value;
            tempNum.echelon = initPrice.echelon;

            if (count.value > 0)
            {
                tempNum.value = tempNum.Mult(count.value + 1, tempNum.echelon);
                tempNum.UpdateEchelon();

                tempNum = tempNum.Pow(priceFactor);
            }

            price   = tempNum;
            tempNum = null;
        }
Esempio n. 2
0
        public Agent(double argPointsRate, double argInitialPriceVal, int argInitialPriceEch, double argPriceFactor)
        {
            // Initialize variables

            // Change these for testing:
            count.value   = 0;
            count.echelon = 1;

            // Progression scaling:
            pointsRate.value  = argPointsRate;
            initPrice.value   = argInitialPriceVal;
            initPrice.echelon = argInitialPriceEch;

            priceFactor = argPriceFactor;
            UpdatePrice();

            // Bank score to unlock:
            unlockScore       = initPrice;
            unlockScore.value = unlockScore.Mult(0.745, unlockScore.echelon);    // Slightly under 3/4 of initial price.
            unlockScore.UpdateEchelon();

            isLocked = true;
        }