public void DifferenceTest() { BaseAlgorithm bfs = new BreadthFirstSearch(); int[,] solution = new int[,] { { 1, 5, 3 }, { 8, 4, 6 }, { 7, 2, 0 } }; Node aNode = new Node(solution); Assert.IsFalse(bfs.IsEqualToSolution(aNode)); }
public void EqualityTest() { BaseAlgorithm bfs = new BreadthFirstSearch(); int[,] solution = new int[,] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 0 } }; Node aNode = new Node(solution); Assert.IsTrue(bfs.IsEqualToSolution(aNode)); }
static void Main(string[] args) { //int[,] array = new int[3, 3] { { 1, 3, 2 }, { 4, 0, 6 }, { 5, 7, 8 } }; int[,] array = new int[3, 3] { { 1, 2, 3 }, { 4, 0, 6 }, { 7, 5, 8 } }; Node aNode = new Node(array); BaseAlgorithm bfs = new BreadthFirstSearch(); bfs.Run(aNode); Console.ReadKey(); }