public static List <Ape> GetSpouse(ApeFamilyTree familyTree, Ape ape) { return(new List <Ape>() { ape.GetSpouse() }); }
public static List <Ape> GetBrotherInLaws(ApeFamilyTree familyTree, Ape ape) { List <Ape> result = new List <Ape>(); result.AddRange(GetBrothers(familyTree, ape.GetSpouse())); List <Ape> sisters = GetSisters(familyTree, ape); foreach (var sister in sisters) { result.Add(sister.GetSpouse()); } return(result); }