Example #1
0
        public override sealed void init()
        {
            base.init();

            if (edges.Count <= 0 || edges.Count > 2)
            {
                throw new Exception("MoronChoice must contain either one or two edges, never more or less");
            }

            trueEdge = edges[0];

            if (edges.Count == 2)
            {
                falseEdge = edges[1];
            }
        }
Example #2
0
        protected GraphEdge recurseToIntent(GraphEdge root)
        {
            MoronChoice choice;

            if (root == null)
            {
                return(null);
            }

            choice = root.to as MoronChoice;
            if (choice == null)
            {
                return(root);
            }

            return(choice.update());
        }
Example #3
0
 public bool equals(GraphEdge other)
 {
     return(to == other.to && from == other.from);
 }