Inheritance Hierarchy
DeltaEngine.GameLogic.PathFinding.Tests AStarSearchTests
Namespace: DeltaEngine.GameLogic.PathFinding.Tests
Assembly: DeltaEngine.GameLogic.PathFinding.Tests (in DeltaEngine.GameLogic.PathFinding.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The AStarSearchTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AStarSearchTests | Initializes a new instance of the AStarSearchTests class |
Methods
Name | Description | |
---|---|---|
CheckPathList | ||
GraphWithNoNodesHasNoPath | ||
Initialize |
0 - 1 - 3
| |
2 4 - 5
View code on GitHub | |
SearchForPathBetweenNodes |
Examples
[Test] public void SearchForPathBetweenNodes() { Assert.IsTrue(aStar.Search(graph, 0, 2)); Assert.IsTrue(aStar.Search(graph, 1, 5)); Assert.IsFalse(aStar.Search(graph, 5, 2)); }
[Test] public void GraphWithNoNodesHasNoPath() { Assert.IsFalse(aStar.Search(new Graph(0), 0, 0)); }
[Test] public void CheckPathList() { aStar.Search(graph, 0, 2); Assert.AreEqual(2, aStar.GetPath().GetListOfCoordinates().Count); aStar.Search(graph, 1, 5); Assert.AreEqual(3, aStar.GetPath().GetListOfCoordinates().Count); }
See Also