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()); }
public MyMap() { m_cGraph = new MyListGraph(); m_cNodeMap = new Dictionary <int, MyMapNode>(); }
public MyPathPlanner(GameObject ownerObject, MyListGraph map) { m_cOwnerObject = ownerObject; this.m_cMap = map; }