示例#1
0
        public DataGraph ToGraph(Maze map)
        {
            var dataGraph = new DataGraph();

            IEnumerable <DataVertex> vertices = CreateVertices(map);

            dataGraph.AddVertexRange(vertices);

            IEnumerable <DataEdge> dataEdges = CreateEdges(map, vertices);

            dataGraph.AddEdgeRange(dataEdges);

            return(dataGraph);
        }