Skip to content

davidlunadeleon/Sudoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku

A Sudoku game created using Godot Game Engine

Game modes

Solver mode

Draw your incomplete sudoku puzzle and let the computer solve it for you!

Solver mode

Normal mode

Play a normal game of Sudoku with different difficulties: easy, medium and hard.

Normal mode

How it works

This project is the adaptation of my previous Sudoku solver made with C++. The Sudoku problem is modelled as a CSP and simplified using the AC-3 Algorithm to ensure arc consistency between variables. This helps simplify the problem by reducing the domain of each variable.

To generate new Sudokus, the same code is reused. A random number between 1 and 9 is chosen and placed in all columns of the grid making sure no constraints are ignored. After the number is placed in its place, the Sudoku is solved to generate a complete puzzle. Afterwards, a random number of cells in the grid are cleared to let the user fill in the gaps. The number of deleted cells varies depending on difficulty.

Built with

About

A Sudoku game created using Godot Game Engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published