public interface ISpotlightSolver
Implementations provide a single method solve(Board)
which takes a
Spotlight board and solves the puzzle if possible. It may use an instance of
class SATSolver
to accomplish the task.
boolean solve(Board board) throws SpotlightException
An implementation should find a coloring of the board b
and color
the board accordingly. The caller expects that b
has been
completely colored if the method returns true
. Otherwise the
board should not be colored at all.
board
- a non-null reference to a Spotlight board. It does not have
any field colored yet.true
if and only if the board has a solution and the
solution has been set.SpotlightException
- if something went wrong during the solving process.