Esempio n. 1
0
    public void SetGoal(InvestmentGoal investorGoal)
    {
        InvestorGoal  = investorGoal.InvestorGoalType;
        goalWasChosen = true;

        Goal = investorGoal;

        ViewRender();
    }
        public static bool IsInvestorSuitableByGoal(InvestorType shareholderType, InvestorGoalType goal)
        {
            switch (goal)
            {
            case InvestorGoalType.ProductBecomeMarketFit:
                return(shareholderType == InvestorType.Angel);

            case InvestorGoalType.BecomeProfitable:
                return(shareholderType == InvestorType.VentureInvestor);

            case InvestorGoalType.GrowCompanyCost:
                return(shareholderType == InvestorType.VentureInvestor || shareholderType == InvestorType.Strategic);

            case InvestorGoalType.IPO:
                return(shareholderType == InvestorType.Strategic || shareholderType == InvestorType.VentureInvestor);

            case InvestorGoalType.ProductPrototype:
            case InvestorGoalType.ProductFirstUsers:
            default:
                return(shareholderType == InvestorType.FFF);
            }
        }
Esempio n. 3
0
 public static bool IsGoalCompleted(GameEntity company, InvestorGoalType goal)
 {
     return(company.completedGoals.Goals.Contains(goal));
 }
Esempio n. 4
0
 public static bool Completed(GameEntity company1, InvestorGoalType goal) => IsGoalCompleted(company1, goal);
Esempio n. 5
0
 public static bool HasGoalAlready(GameEntity company, InvestorGoalType goalType)
 {
     return(company.companyGoal.Goals.Any(g => g.InvestorGoalType == goalType));
 }
Esempio n. 6
0
        public static InvestmentGoal GetInvestmentGoal(GameEntity company, GameContext gameContext, InvestorGoalType goalType)
        {
            var income = Economy.GetIncome(gameContext, company);

            var unknown = new InvestmentGoalUnknown(goalType);

            var strongerOpponent = Companies.GetStrongerCompetitor(company, gameContext, true);
            var weakerOpponent   = Companies.GetWeakerCompetitor(company, gameContext, true);

            if (goalType == InvestorGoalType.OutcompeteCompanyByIncome ||
                goalType == InvestorGoalType.OutcompeteCompanyByCost ||
                goalType == InvestorGoalType.OutcompeteCompanyByUsers)
            {
                if (strongerOpponent == null)
                {
                    return(unknown);
                }
            }

            if (goalType == InvestorGoalType.AcquireCompany)
            {
                if (weakerOpponent == null)
                {
                    return(unknown);
                }
            }

            NicheType MainMarket = company.companyFocus.Niches[0];

            switch (goalType)
            {
            case InvestorGoalType.ProductPrototype:         return(new InvestmentGoalMakePrototype());

            case InvestorGoalType.ProductFirstUsers:        return(new InvestmentGoalFirstUsers(5_000));

            case InvestorGoalType.ProductMillionUsers:      return(new InvestmentGoalMillionUsers(1_000_000));

            case InvestorGoalType.ProductBecomeMarketFit:   return(new InvestmentGoalMakeProductMarketFit());

            case InvestorGoalType.ProductRelease:           return(new InvestmentGoalRelease());

            case InvestorGoalType.ProductPrepareForRelease: return(new InvestmentGoalPrepareForRelease());

            case InvestorGoalType.ProductStartMonetising:   return(new InvestmentGoalStartMonetisation());

            case InvestorGoalType.ProductRegainLoyalty:     return(new InvestmentGoalRegainLoyalty());

            case InvestorGoalType.BecomeProfitable:         return(new InvestmentGoalBecomeProfitable(income));

            case InvestorGoalType.GrowIncome:               return(new InvestmentGoalGrowProfit(Economy.GetIncome(gameContext, company) * 3 / 2));

            case InvestorGoalType.GrowUserBase:             return(new InvestmentGoalGrowAudience(Marketing.GetUsers(company) * 2));

            case InvestorGoalType.GrowCompanyCost:          return(new InvestmentGoalGrowCost(Economy.CostOf(company, gameContext) * 2));

            //case InvestorGoalType.GainMoreSegments:         return new InvestmentGoalMoreSegments   (Marketing.GetAmountOfTargetAudiences(company) + 1);

            case InvestorGoalType.OutcompeteCompanyByIncome:    return(new InvestmentGoalOutcompeteByIncome(strongerOpponent.company.Id, strongerOpponent.company.Name));

            case InvestorGoalType.OutcompeteCompanyByUsers:     return(new InvestmentGoalOutcompeteByUsers(strongerOpponent.company.Id, strongerOpponent.company.Name));

            case InvestorGoalType.OutcompeteCompanyByCost:      return(new InvestmentGoalOutcompeteByCost(strongerOpponent.company.Id, strongerOpponent.company.Name));

            case InvestorGoalType.AcquireCompany:               return(new InvestmentGoalAcquireCompany(weakerOpponent.company.Id, weakerOpponent.company.Name));

            case InvestorGoalType.DominateMarket:               return(new InvestmentGoalDominateMarket(MainMarket));

            case InvestorGoalType.BuyBack:                      return(new InvestmentGoalBuyBack());

            case InvestorGoalType.Operationing:       return(new InvestmentGoalGrowProfit(Economy.GetIncome(gameContext, company) * 3 / 2));

            default: return(unknown);
            }
        }
Esempio n. 7
0
 public override string GetFormattedName() => "Unknown: " + InvestorGoalType.ToString();
Esempio n. 8
0
 public InvestmentGoalUnknown(InvestorGoalType investorGoalType) : base(investorGoalType)
 {
 }
Esempio n. 9
0
 public InvestmentGoal(InvestorGoalType goalType)
 {
     InvestorGoalType = goalType;
 }
Esempio n. 10
0
 public InvestmentGoal()
 {
     InvestorGoalType = InvestorGoalType.None;
 }
Esempio n. 11
0
 bool HasOrCompletedGoal(GameEntity company, InvestorGoalType goalType)
 {
     return(company.companyGoal.Goals.Any(g => g.InvestorGoalType == goalType) || Investments.IsGoalCompleted(company, goalType));
 }
Esempio n. 12
0
 private static bool HasGoal(GameEntity company, InvestorGoalType goalType)
 {
     return(company.companyGoal.Goals.Any(g => g.InvestorGoalType == goalType));
 }
Esempio n. 13
0
    void RenderProgress(GoalRequirements requirements, InvestorGoalType investorGoal)
    {
        switch (investorGoal)
        {
        case InvestorGoalType.ProductPrototype:
            NeedLabel.text = "Improved Core Users";
            NeedValue.text = Format.Minify(requirements.need);

            HaveLabel.text = "Core Users Improvements";
            HaveValue.text = Format.Minify(requirements.have);
            break;

        case InvestorGoalType.ProductRelease:
            NeedLabel.text = "Release your app";
            NeedValue.text = Format.Minify(requirements.need);

            HaveLabel.text = "";
            HaveValue.text = "";     // ValueFormatter.Shorten(requirements.have);
            break;

        case InvestorGoalType.ProductFirstUsers:
            NeedLabel.text = "Required amount of users";
            NeedValue.text = Format.Minify(requirements.need);

            HaveLabel.text = "Current amount of users";
            HaveValue.text = Format.Minify(requirements.have);
            break;

        case InvestorGoalType.ProductBecomeMarketFit:
            NeedLabel.text = "Required product level";
            NeedValue.text = Format.Minify(requirements.need);

            HaveLabel.text = "Current product level";
            HaveValue.text = Format.Minify(requirements.have);
            break;

        case InvestorGoalType.BecomeProfitable:
            NeedLabel.text = "Required Profit";
            NeedValue.text = Format.Minify(requirements.need);

            HaveLabel.text = "Our Profit";
            HaveValue.text = Format.Minify(requirements.have);
            break;

        case InvestorGoalType.GrowCompanyCost:
            NeedLabel.text = "Required Company Cost";
            NeedValue.text = Format.Minify(requirements.need);

            HaveLabel.text = "Current Company Cost";
            HaveValue.text = Format.Minify(requirements.have);
            break;

        case InvestorGoalType.IPO:
            NeedLabel.text = "Organise IPO!";
            NeedValue.text = "";     // ValueFormatter.Shorten(requirements.need);

            HaveLabel.text = "";
            HaveValue.text = "";
            break;
        }

        if (hasProgressBar)
        {
            ProgressBar.SetValue(requirements.have, requirements.need);
        }
    }
Esempio n. 14
0
 int CompareGoals(InvestorGoalType goal1, InvestorGoalType goal2)
 {
     return((int)goal1 - (int)goal2);
 }
Esempio n. 15
0
    bool IsGoalWasCompletedEarlier(InvestorGoalType currentGoal)
    {
        var result = CompareGoals(TargetGoal, currentGoal);

        return(result < 0);
    }