public void LastOneCantSolve() { solver = new OneLeftSolver(); bool solvedIt = solver.SolveCell(puzzle, 3, 0); Assert.IsFalse(solvedIt); }
public void LastOneRow() { solver = new OneLeftSolver(); bool solvedIt = solver.SolveCell(puzzle, 0, 2); Assert.IsTrue(solvedIt); Assert.AreEqual(puzzle.Cells[0, 2].Value, '3'); }
public void LastOneColumn() { solver = new OneLeftSolver(); bool solvedIt = solver.SolveCell(puzzle, 2, 3); Assert.IsTrue(solvedIt); Assert.AreEqual(puzzle.Cells[2, 3].Value, '4'); }
public void LastOneBox() { solver = new OneLeftSolver(); bool solvedIt = solver.SolveCell(puzzle, 1, 0); Assert.IsTrue(solvedIt); Assert.AreEqual(puzzle.Cells[1, 0].Value, '1'); }
public void DepthFirstSolve() { solver = new DepthFirstSolver(); bool solvedIt = solver.SolveCell(puzzle, 0, 0); Assert.IsTrue(solvedIt); Assert.IsTrue(solver.IsSolved(puzzle)); }
public void DepthFirstCantSolve() { solver = new DepthFirstSolver(); puzzle.Cells[0, 2].Value = '4'; bool solvedIt = solver.SolveCell(puzzle, 0, 0); Assert.IsFalse(solvedIt); }