Пример #1
0
        internal static bool TryGetPred(this Knoten node, out Knoten pred)
        {
            pred = null;

            if (node.Pred == null)
            {
                return(false);
            }

            pred = node.Pred;

            return(true);
        }
Пример #2
0
        internal static bool TryGetAt(this Knoten[] graph, int x, int y, int zeilen, out Knoten knoten)
        {
            var index = y * zeilen + x;

            knoten = null;

            if (graph[index] != null)
            {
                knoten       = graph[index];
                graph[index] = null;

                return(true);
            }

            return(false);
        }