/SudokuSolver

A Python program with a graphical interface that solves Sudoku puzzles.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Sudoku Solver

This is a Sudoku solver program implemented in Python using the Pygame library for the graphical user interface (GUI). It allows you to play Sudoku puzzles by entering numbers and provides a solve feature to automatically solve the puzzles with animation.

Requirements

  • Python 3.x
  • Pygame library

Usage

  1. Install the required dependencies by running the following command:
    pip install pygame
  2. Run the GUI.py file to start the Sudoku solver program:
    python SudokuSolverGUI.py
  3. The Sudoku board will be displayed on the Pygame window. Use the mouse to select a cell and use the number keys (1-9) to enter a value in the selected cell. Press the Enter key to confirm the entered value.
  4. If you make a mistake, you can press the Delete key to clear the selected cell.
  5. Press the Space key to solve the Sudoku puzzle automatically. The program will display the solved puzzle on the board with enhanced animation.
  6. If the puzzle is solved correctly, the program will display "Game over" on the console.
  7. You can exit the program by closing the Pygame window or pressing the QUIT button.

Features

  1. Editable Sudoku Board: You can now enter values in the Sudoku board by selecting a cell and using the number keys (1-9). Press the Enter key to confirm the entered value. If you want to clear a cell, press the Delete key.
  2. Active Cell Highlight: The currently selected cell is highlighted to provide a visual indication of the active cell.
  3. Enhanced Solve Animation: The solve animation has been improved to provide a smoother and more visually appealing experience. The solved puzzle is displayed on the board with a gradual fade-in effect.
  4. GUI Design Improvements: The GUI design has been enhanced to provide a cleaner and more user-friendly interface. The Sudoku board and buttons have been styled to improve readability and aesthetics.
  5. Additional Enhancements: Various other enhancements have been made to improve the overall user experience and performance of the Sudoku solver program.

Possible Improvements

Here are some possible improvements that can be made to further enhance the Sudoku solver program:

  1. Difficulty Levels: Implement different difficulty levels for the generated Sudoku puzzles, such as easy, medium, and hard. This will allow users to choose the level of challenge they prefer.
  2. User Profiles: Add the ability for users to create profiles and track their progress, including the number of puzzles solved, completion time, and accuracy. This can provide a more personalized and engaging experience.
  3. Timer and Scoring System: Implement a timer to track the time taken to solve each puzzle and introduce a scoring system based on completion time. This can add a competitive element to the game and encourage users to improve their solving speed.
  4. Hint System: Include a hint system that provides suggestions to the user when they are stuck or facing difficulties in solving the puzzle. This can assist users in learning new strategies and techniques.
  5. Save and Load: Allow users to save their progress and resume it later. This feature can be helpful for longer puzzles or when users want to take a break and come back to the puzzle at a later time.
  6. Multiple Board Designs: Introduce different board designs and themes to give users a choice in the visual appearance of the Sudoku board. This can add variety and personalization to the user experience.
  7. Multiplayer Mode: Implement a multiplayer mode where users can compete against each other in real-time or asynchronously, solving the same puzzle and comparing their completion times and accuracy.
  8. Accessibility Features: Incorporate accessibility features such as text-to-speech support, colorblind-friendly options, and keyboard-only navigation to ensure that the program is accessible to a wider range of users.
  9. Puzzle Generator Algorithms: Explore different puzzle generation algorithms to create Sudoku puzzles with unique characteristics and patterns. This can provide a more diverse and interesting puzzle-solving experience.
  10. Error Detection and Highlighting: Add error detection and highlighting functionality to notify users of any incorrect entries they make in the Sudoku board. This can help users identify and correct mistakes more easily.

These are just a few ideas for potential improvements. Feel free to explore these suggestions or come up with your own ideas to enhance the Sudoku solver program further.

Contributing

Contributions are welcome! If you find any issues or have suggestions for further improvements, please feel free to open an issue or submit a pull request.