Skip to content

satrancci/sudoku-solver-with-gui

Repository files navigation

Sudoku Solver with GUI

This program, written with the help of pygame module, allows users to play a 9x9 sudoku game with hints. Here is how a board looks like:

Suduoku board

The hints are provided in the command line. In order to play a move, click on the cell and then click on the number that you want to place in that cell.

  • If a move is illegal, the number that we have just placed will be marked as red and the corresponding message will be displayed in the command line:

    Illegal move board

    Illegal move message

    In order to clear a cell, click on button d on your keyboard and then click on the cell that you want clear.

  • If a move is legal, but the position cannot be solved from the current configuration, the number that we have just placed will again be marked as red and the corresponding message will be displayed in the command line:

    Impossible move board

    Impossible move message
  • If a move is legal and the position can be solved from the current configuration, then the number that we have just placed will be assigned a regular color and the corresponding message will be displayed in the command line:

    Impossible move board

    Impossible move message
  • If you don't want to play and just want to see the solution to a given position, click on SPACE button. Shortly, the following message will be displayed in the command line:

    Impossible move board

    • If you press 1, the solution to the puzzle will be displayed:

      Solved board

      and then a new random position will appear on the screen:

      Solved board

      Legal starting positions are stored in matrices.py file. Right now, the file contains only three positions. For a greater variety, feel free to add more!

    • If you press 0, the program will quit with the "Thanks, bye!" message.

About

A GUI sudoku solver using Pygame

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages