Skip to content

A solver using backtracking for grid-based number puzzles (such as Sudoku, Takuzu, etc.) with CLI and GUI versions.

Notifications You must be signed in to change notification settings

ThomasCaud/numeric-puzzle-solver

Repository files navigation

Bugs Vulnerabilities Duplicated Lines (%) Reliability Rating Coverage Maintainability Rating Security Rating

Solver

  • The solver uses backtracking. It is able to solve puzzle games based on rectangular board, where the player has to deduce missing digits. The most known game is the Sudoku for example.
  • You only have to update the "Main" class with the grid you would like to solve. Set "-1" for empty cell.
  • Two ways of displaying are available: through console of through JFrame. See the DisplayStrategy interface.
  • To solve another Game, you only have to extend the abstract class GridValidator. The solver will manage the rest.
  • To sum-up: the solver needs to know the game name (see GameName enumeration), the board inputs, and the displayStrategy. That's all.

Sudoku

You know this game. :-)

Demonstration

Binero

The Binero is a derivative of sudoku, where the boxes contain only 0 and 1.

Here are the rules:

  • Each row and column must contain as much as 1 to 0.
  • It can't be more than two 0 or two 1 following.
  • There can not be two identical lines or two identical columns.

Demonstration

About

A solver using backtracking for grid-based number puzzles (such as Sudoku, Takuzu, etc.) with CLI and GUI versions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages