Amoeba.BoxUtils.GetLength C# (CSharp) Method

GetLength() public static method

public static GetLength ( Box box ) : long
box Box
return long
        public static long GetLength(Box box)
        {
            long length = 0;

            foreach (var item in box.Seeds)
            {
                length += item.Length;
            }

            foreach (var item in box.Boxes)
            {
                length += GetLength(item);
            }

            return length;
        }