public void AddLifepath(Lifepath lp) { if (lp == null) { throw new ArgumentNullException(); } LifepathList.Add(lp); }
//Bool indicates whether the item was actually in the list at all public bool DropLifepath(Lifepath lp) { if (LifepathList.Contains(lp)) { LifepathList.Remove(lp); return(true); } return(false); }
public static int LifepathLeadsCount(Character character) { int count = 0; Lifepath lastLP = null; foreach (Lifepath lp in character.LifepathList) { if (lastLP != null && lastLP.LeadsTo(lp)) { count++; } lastLP = lp; } return(count); }
public bool LeadsTo(Lifepath lp2) { foreach (string s in Leads) { if (s.Equals(lp2.Setting)) { return(true); } } //User may manually opt for lifepath that isn't lead to explicitly, //so the default behavior is to assume it's a lead. if (!Setting.Equals(lp2.Setting)) { return(true); } return(false); }
public bool LeadsTo(Lifepath arg1) { }
private static Lifepath copyLifepath(Lifepath lp) { string serialized = JsonConvert.SerializeObject(lp); return(JsonConvert.DeserializeObject <Lifepath>(serialized)); }
public static bool AreEquivalent(Lifepath lpA, Lifepath lpB) { return(lpA.Name.Equals(lpB.Name) && lpA.Setting.Equals(lpB.Setting)); }