Class Solver


  • public final class Solver
    extends java.lang.Object
    Solves a partially filled Sudoku. Can find multiple solutions if they are there.
    Author:
    Stephan Fuhrmann
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int LIMIT
      The default limit.
    • Constructor Summary

      Constructors 
      Constructor Description
      Solver​(GameMatrix solveMe)
      Creates a solver for the given riddle.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setLimit​(int set)
      Set the limit for maximum results.
      java.util.List<GameMatrix> solve()
      Solves the Sudoku problem.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Solver

        public Solver​(GameMatrix solveMe)
        Creates a solver for the given riddle.
        Parameters:
        solveMe - the riddle to solve.
    • Method Detail

      • setLimit

        public void setLimit​(int set)
        Set the limit for maximum results.
        Parameters:
        set - the new limit.
      • solve

        public java.util.List<GameMatrix> solve()
        Solves the Sudoku problem.
        Returns:
        the found solutions. Should be only one.