static void testFindHackPath1() { string[,] testMatrix = { { "1C", "BD", "55", "E9", "55" }, { "1C", "BD", "1C", "55", "E9" }, { "55", "E9", "E9", "BD", "BD" }, { "55", "FF", "FF", "1C", "1C" }, { "FF", "E9", "1C", "BD", "FF" } }; MatrixSolver matrixSolver = new MatrixSolver(testMatrix); matrixSolver.findHackPath(new List <string> { "E9", "BD", "FF", "1C" }); }
static void testFindHackPath_sameSquareBypass() { string[,] testMatrix = { { "1C", "BD", "55", "E9", "55" }, { "1C", "BD", "1C", "55", "E9" }, { "55", "E9", "E9", "BD", "BD" }, { "55", "FF", "FF", "1C", "1C" }, { "FF", "E9", "1C", "BD", "FF" } }; MatrixSolver matrixSolver = new MatrixSolver(testMatrix); List <Tuple <int, int> > expectedPath = null; Assert.Equal(expectedPath, matrixSolver.findHackPath(new List <string> { "1C", "BD", "BD", "1C", "1C" })); }