Пример #1
0
        public void TestMethod1()
        {
            MyListGraph graph = new MyListGraph();

            graph.AddNode(new MyGraphNode(0));
            graph.AddNode(new MyGraphNode(1));
            graph.AddNode(new MyGraphNode(2));
            graph.AddNode(new MyGraphNode(3));
            graph.AddNode(new MyGraphNode(4));

            graph.AddEdge(new MyGraphEdge(0, 2));
            graph.AddEdge(new MyGraphEdge(2, 1));

            graph.AddEdge(new MyGraphEdge(2, 3));
            graph.AddEdge(new MyGraphEdge(4, 3));

            Assert.AreEqual(1, graph.SoMienDoThiLienThong());
        }
Пример #2
0
 public MyMap()
 {
     m_cGraph   = new MyListGraph();
     m_cNodeMap = new Dictionary <int, MyMapNode>();
 }
Пример #3
0
 public MyPathPlanner(GameObject ownerObject, MyListGraph map)
 {
     m_cOwnerObject = ownerObject;
     this.m_cMap    = map;
 }