Graph AdjacentLinks Property Delta Engine Documentation

Namespace: DeltaEngine.GameLogic.PathFinding
Assembly: DeltaEngine.GameLogic.PathFinding (in DeltaEngine.GameLogic.PathFinding.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public List<LinkToGraphNode>[] AdjacentLinks { get; protected set; }

Property Value

Type:  List LinkToGraphNode  
Remarks

Tests: DeltaEngine.GameLogic.PathFinding.Tests.GraphTests
Remarks

Tests: DeltaEngine.GameLogic.PathFinding.Tests.LevelGraphTests
Examples

1 unit tests call DeltaEngine.GameLogic.PathFinding.Graph.AdjacentLinks
[Test]
public void CheckAdjacentLinks()
{
    Assert.AreEqual(4, graphAsPlusShape.AdjacentLinks[2].Count);
    Assert.AreEqual(1, graphAsPlusShape.AdjacentLinks[0].Count);
    Assert.AreEqual(1, graphAsPlusShape.AdjacentLinks[1].Count);
    Assert.AreEqual(1, graphAsPlusShape.AdjacentLinks[3].Count);
    Assert.AreEqual(1, graphAsPlusShape.AdjacentLinks[4].Count);
}
Examples

1 unit tests call DeltaEngine.GameLogic.PathFinding.Graph.AdjacentLinks
[Test]
public void CheckUpdateWeightInLinks()
{
    grid3X2.UpdateWeightInAdjacentNodes(new Vector2D(0, 1), 1, 10);
    Assert.AreEqual(20, grid3X2.AdjacentLinks[1][0].Costs);
    Assert.AreEqual(10, grid3X2.AdjacentLinks[1][1].Costs);
    Assert.AreEqual(20, grid3X2.AdjacentLinks[1][2].Costs);
    grid3X2.ResetGraph();
    foreach(var links in grid3X2.AdjacentLinks)
        foreach (var link in links)
            Assert.IsTrue(link.IsActive);
}
See Also