The module io.github.mmm.sudoku
(artifactId mmm-sudoku
) provides a flexible model and engine for Sudoku puzzles.
Instead of hard-coding specific types of Sudokus we designed the Sudoku to have any number of Partitionings
.
Each Partitioning
can divide the Sudoku board entirely or partially into any number of partitions.
Every Sudoku always has Column
and Row
as Partitioning
. Most of them also have Box
but a Jigsaw Sudoku (Squiggly Sudoku) has Regions
that are typically non-rectangular. The latter even allows an irregular Dimension
such as a 5x5 board.
Even Killer Sudoku (SumDoku) is possible with this model.
The great thing about this design is that implementations like solvers or generators as well as the UI presenting the game can stay generic and need little to no knowledge of the different kind of Sudokus (except for SumDokus that add a whole new concept to the game).
This library offers the following features:
-
Powerful but easy model for Sudoku and its variants
-
Support for all common kinds of Sudoku variants
-
Ability to add and implement your own variant in minutes
-
History with unlimited undo/redo
-
Support and auto-generation for candidates (pencil marks)
-
Automatic error detection
-
Generation of hints and solutions
-
Validation of the Sudoku
-
Eventing to observe changes and other aspects
Maven Dependency:
<dependency>
<groupId>io.github.m-m-m</groupId>
<artifactId>mmm-sudoku</artifactId>
<version>${mmm.version}</version>
</dependency>
Module Dependency:
requires transitive io.github.mmm.sudoku;
The module io.github.mmm.sudoku.fx
(artifactId mmm-sudoku-fx
) provides the JavaFx GUI for the sudoku game engine.
This library offers the following features:
-
Configuration of the Sudoku puzzle (dimension, difficulty, type, etc.)
-
Presentation of the Sudoku-Board.
-
Set values and candidates (pencil marks)
-
Unlimited undo/redo
-
Show candidates, get hits, etc. *
Maven Dependency:
<dependency>
<groupId>io.github.m-m-m</groupId>
<artifactId>mmm-sudoku-fx</artifactId>
<version>${mmm.version}</version>
</dependency>
Module Dependency:
requires transitive io.github.mmm.sudoku.fx;
Sudokus are an interesting topic both from mathematics as well as from computer-science. Implementing this project allowed me to apply my knowledge about maths, graph-theory, data-modelling, boolean algebra and bit-mapping, efficient algorithm design, and many other disciplines. The following links helped me to learn more about the topic and could be interesting also for others interested in this topic.
-
Mathematics of Sudoku (Wikipedia)
-
Sudokus bewerten per Python-Skript (ct' Magazin, Heise Medien)
-
Create a Sudoku Solver in Java (Baeldung)
-
Glossary of Sudoku (Wikipedia)
-
My Simple Combinatorial Method to Enumerate All Sudoku Solution Grids (Discussion)
Other open-source Sudoku implementations:
-
Python
-
Sudokus bewerten per Python-Skript (ct' Magazin, Heise Medien)
-
sudoku-solver (tejasmorkar)
-
-
C++
-
tdoku (t-dillon)
-
ColorSudoku (plastovicka)
-
-
Java
-
JavaFX-Sudoku (BenJeau)
-
JSudoku (ksokolovic)
-
JSudoku (oscr)
-
Best Android Sudoku Apps: