Beispiel #1
0
        public static ScratchValoration Evaluate(this ScratchObject obj)
        {
            if (obj.RawScripts == null)
            {
                return(ScratchValoration.Default());
            }

            return(Get_valoration(obj.Scripts, obj.Blocks));
        }
Beispiel #2
0
        public static ScratchValoration GeneralEvaluation(
            this ScratchObject obj)
        {
            if (obj.RawScripts == null ||
                obj.Children == null)
            {
                return(ScratchValoration.Default());
            }

            var blocks  = new List <string>();
            var scripts = new List <List <object> >();

            foreach (var child in obj.Children)
            {
                if (child.RawScripts != null)
                {
                    blocks.AddRange(child.Blocks);
                    scripts.AddRange(child.Scripts);
                }
            }
            return(Get_valoration(scripts, blocks));
        }