public void StartDebug(CalculationNode n, int val) { if (debug) { startCapture = filter(n.ComboKey, value); value = val; debugState = new List <(int noCoins, int noCombinations)>(); } }
public DebugState(CalculationNode n, int val, IList <(int noCoins, int noCombinations)> debug)
public void Debug(CalculationNode n, int noCoins, int noCombinations) { debugger.Debug(n, noCoins, noCombinations); }
public void EndDebug(CalculationNode n) { debugger.EndDebug(n); }
public void StartDebug(CalculationNode n, int value) { debugger.StartDebug(n, value); }
public String ComboKey(CalculationNode n) { return(n.GetCoin().GenerateMyUnits().Aggregate("", (x, y) => x += y)); }
public bool IsParent(CalculationNode candidate) { return(coin.GenerateMyUnits().SequenceEqual(candidate.TailUnits())); }
public CalculationNode AddChild(CalculationNode n) { children.Add(n); n.SetParent(this); return(this); }
public void SetParent(CalculationNode parent) { this.parent = parent; }