uk.co.keang.sudoku.solver
Class AssociatedPairsSolver

java.lang.Object
  extended by uk.co.keang.sudoku.solver.AbstractSolver
      extended by uk.co.keang.sudoku.solver.AssociatedPairsSolver

public class AssociatedPairsSolver
extends AbstractSolver

Author:
A.G.Docherty Provides resolution by looking for a given number, when it's only possible in two cells of two different rows, and that the four possibilities are on two columns (and form a rectangle), then that candidate can be excluded for the other cells of the column. The same method applies in the case of two columns, the excluded candidates will then be on the rows.

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.co.keang.sudoku.solver.AbstractSolver
AbstractSolver.SolverDifficulty
 
Field Summary
 
Fields inherited from class uk.co.keang.sudoku.solver.AbstractSolver
found, hGrid, puzzle
 
Constructor Summary
AssociatedPairsSolver(Puzzle grid)
           
 
Method Summary
 int findSolutions()
          Runs the solver once to try to resolve individual squares
 
Methods inherited from class uk.co.keang.sudoku.solver.AbstractSolver
addSolverListener, fireSolutionEvent, getDifficultyFactor, getSolverDifficulty, hasSolverListeners, removeAllFromSet, removeAllSolverListeners, removeSolverListener, retainAllInSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociatedPairsSolver

public AssociatedPairsSolver(Puzzle grid)
Method Detail

findSolutions

public int findSolutions()
                  throws IllegalGridException
Description copied from class: AbstractSolver
Runs the solver once to try to resolve individual squares

Specified by:
findSolutions in class AbstractSolver
Returns:
the number of solutions found
Throws:
IllegalGridException