public static bool IsDaughterOf(GameEntity parent, GameEntity daughter) { if (!parent.hasShareholder) { Companies.Log(daughter, $"FALSELY CALLED IS_DAUGHTER_OF on companies: possible parent={parent.company.Name}, possible daughter={daughter.company.Name}"); return(false); } return(Investments.IsInvestsInCompany(parent, daughter)); // IsInvestsInCompany(daughter, parent.shareholder.Id); }
public static bool IsInvestsInCompany(GameEntity company, GameEntity investor) => Investments.IsInvestsInCompany(investor, company);
public static bool IsInvestsInCompany(GameEntity company, int investorId) { return(Investments.IsInvestsInCompany(investorId, company)); //return company.shareholders.Shareholders.ContainsKey(investorId); }