public int SumToMax(int current, int max) { if (Bigger != null) { current += Bigger.SumToMax(0, max - current); } if (Value <= max - current) { current += Value; NodeColor = Microsoft.Glee.Drawing.Color.Red; } if (Smaller != null) { current += Smaller.SumToMax(0, max - current); } return(current); }