public void TestSolve_Empty() { PuzzleMonolithic puzzle = new PuzzleMonolithic(); puzzle.Solve(); DisplayPuzzle(puzzle); Assert.IsTrue(puzzle.IsSolved()); }
public void TestSolve_Hardest() { PuzzleMonolithic puzzle = new PuzzleMonolithic(); PopulateHardestValues(puzzle); DisplayPuzzle(puzzle); puzzle.Solve(); Console.WriteLine(); Console.WriteLine(); DisplayPuzzle(puzzle); Assert.IsTrue(puzzle.IsSolved()); }
public void TestSolve_AllLocked() { PuzzleMonolithic puzzle = new PuzzleMonolithic(); PopulateSolvedValues(puzzle); LockAllCellValues(puzzle); DisplayPuzzle(puzzle); puzzle.Solve(); Console.WriteLine(); Console.WriteLine(); DisplayPuzzle(puzzle); Assert.IsTrue(puzzle.IsSolved()); }
public void TestSolve_Locked_3() { PuzzleMonolithic puzzle = new PuzzleMonolithic(); PopulateSolvedValues(puzzle); LockAllCellValues(puzzle); DisplayPuzzle(puzzle); // Unlock the last two values puzzle.GetCell(0, 0).IsLocked = false; puzzle.GetCell(0, 1).IsLocked = false; puzzle.Solve(); Console.WriteLine(); Console.WriteLine(); DisplayPuzzle(puzzle); Assert.IsTrue(puzzle.IsSolved()); }