public int GetPotNumberSum() { var sum = 0; foreach (var kvp in PotDict.Where(x => x.Value.ContainsPlant)) { sum += kvp.Value.PotNumber; } return(sum); }
private void trim() { for (var i = LowerBound; i <= LowerPotWithPlant - 5; i++) { PotDict.Remove(i); LowerBound++; } for (var i = UpperBound; i >= UpperPotWithPlant + 5; i--) { PotDict.Remove(i); UpperBound--; } }