Beispiel #1
0
        public String GetString()
        {
            int    level        = 0;
            String s            = "";
            String sLevelString = "";

            while (level <= MaxLines)
            {
                sLevelString = TopPyramid.GetString(level++);
                if (sLevelString.Length > 0)
                {
                    //                    s = sLevelString + " " + s;
                    s = sLevelString + s;
                }
            }
            return(s);
        }
Beispiel #2
0
        public String GetString(int aLevel)
        {
            String s = "";

            if (Top4CellPyramid == null)
            {
                // if correct levels, set corresponding valuse of this 4 cell pyramid
                if ((aLevel == TopLineLevel && !GetActualUpside()) || (aLevel == BottomLineLevel && GetActualUpside()))
                {
                    s = (TopValue ? "1" : "0") + s;
                }
                if ((aLevel == BottomLineLevel && !GetActualUpside()) || (aLevel == TopLineLevel && GetActualUpside()))
                {
                    s = (BottomRightValue ? "1" : "0") +
                        (BottomUpsideValue ? "1" : "0") +
                        (BottomLeftValue ? "1" : "0") + s;
                }
            }
            else
            {
                if (Top4CellPyramid != null)
                {
                    s = Top4CellPyramid.GetString(aLevel) + s;
                }
                if (BottomLeft4CellPyramid != null)
                {
                    s = BottomLeft4CellPyramid.GetString(aLevel) + s;
                }
                if (BottomUpside4CellPyramid != null)
                {
                    s = BottomUpside4CellPyramid.GetString(aLevel) + s;
                }
                if (BottomRight4CellPyramid != null)
                {
                    s = BottomRight4CellPyramid.GetString(aLevel) + s;
                }
            }

            // return source data, unprocessed on this step
            return(s);
        }