示例#1
0
    protected bool IsTopEdge(TriPyramid triPyramid, FormElement formElement)
    {
        if (!formElement.IsFull())
        {
            return(false);
        }
        if (formElement.count != 2)
        {
            return(false);
        }

        string[] fields = formElement.fields;

        bool result = (triPyramid.IsSignTop(fields[0]) && triPyramid.IsSignBottom(fields[1])) ||
                      (triPyramid.IsSignTop(fields[1]) && triPyramid.IsSignBottom(fields[0]));

        return(result);
    }
示例#2
0
    protected bool IsBottomCorner(TriPyramid triPyramid, FormElement formElement)
    {
        if (!formElement.IsFull())
        {
            return(false);
        }
        if (formElement.count != 3)
        {
            return(false);
        }

        string[] fields = formElement.fields;

        bool result = triPyramid.IsSignBottom(fields[0]) && triPyramid.IsSignBottom(fields[1]) && triPyramid.IsSignBottom(fields[2]);

        result = result && (fields[0] != fields[1]) && (fields[0] != fields[2]) && (fields[1] != fields[2]);

        return(result);
    }