This is a Sudoku solver and game application written in Haskell using the Gloss library for graphical user interface. The project offers features to generate Sudoku puzzles, allow user-generated Sudoku boards, and provide an interactive interface to play and solve Sudoku puzzles.
- Generate Sudoku puzzles of varying sizes (4x4, 6x6, 9x9) with adjustable difficulty levels.
- Create custom Sudoku boards with manual input and validate their solvability.
- Interactive gameplay with a timer, error highlighting, and restart functionality.
- Sudoku puzzle solver using combinatorial methods to find solutions.
- Real-time interface updates for incorrect values and conflicts.
- Install the necessary libraries:
Gloss
andSystem.Random
(required for random number generation). - Compile the program using GHC:
ghc Sudoku.hs
. - Run the executable:
./Sudoku
.
The application's interface utilizes Gloss for rendering 2D graphics and interactive elements. It supports various menus and options, each with distinct behaviors and visual cues. The user can navigate through the menus, generate puzzles, solve or play puzzles, and interact with the puzzle board.
The Sudoku solving algorithm is based on combinatorial methods. It assigns possible values to each cell and iteratively reduces possibilities based on the rules of Sudoku. The algorithm aims to find a unique solution for the puzzle.