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); } }
public static bool IsGoalCompleted(GameEntity company, InvestorGoalType goal) { return(company.completedGoals.Goals.Contains(goal)); }
public static bool Completed(GameEntity company1, InvestorGoalType goal) => IsGoalCompleted(company1, goal);
public static bool HasGoalAlready(GameEntity company, InvestorGoalType goalType) { return(company.companyGoal.Goals.Any(g => g.InvestorGoalType == goalType)); }
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); } }
public override string GetFormattedName() => "Unknown: " + InvestorGoalType.ToString();
public InvestmentGoalUnknown(InvestorGoalType investorGoalType) : base(investorGoalType) { }
public InvestmentGoal(InvestorGoalType goalType) { InvestorGoalType = goalType; }
public InvestmentGoal() { InvestorGoalType = InvestorGoalType.None; }
bool HasOrCompletedGoal(GameEntity company, InvestorGoalType goalType) { return(company.companyGoal.Goals.Any(g => g.InvestorGoalType == goalType) || Investments.IsGoalCompleted(company, goalType)); }
private static bool HasGoal(GameEntity company, InvestorGoalType goalType) { return(company.companyGoal.Goals.Any(g => g.InvestorGoalType == goalType)); }
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); } }
int CompareGoals(InvestorGoalType goal1, InvestorGoalType goal2) { return((int)goal1 - (int)goal2); }
bool IsGoalWasCompletedEarlier(InvestorGoalType currentGoal) { var result = CompareGoals(TargetGoal, currentGoal); return(result < 0); }