Coder Social home page Coder Social logo

sudoku's Introduction

Project Description: Sudoku Solver

This project is a Sudoku solver implemented in Python using the Pygame library for the graphical user interface (GUI). The purpose of the code is to provide a visual representation of a Sudoku grid and allow users to interactively solve Sudoku puzzles or let the solver automatically find the solution.

To run the code on your computer, follow these steps:

Prerequisites:

Python: Make sure you have Python installed on your computer. You can download and install Python from the official Python website (https://www.python.org).

Dependencies:

Pygame: The code relies on the Pygame library for the GUI. You can install it by running the following command in your terminal or command prompt:

pip install pygame

Download the code:

Copy the provided code and save it in a file named GUI.py on your computer.

Run the code:

Open a terminal or command prompt. Navigate to the directory where you saved the GUI.py file. Run the code using the following command:

python GUI.py

Interacting with the Sudoku solver:

Once the code is running, a Sudoku grid will appear on the screen. You can use the keyboard to enter numbers into the grid. Press the corresponding number keys (1-9) to input a value into the selected cell. Use the arrow keys to navigate through the grid and select different cells. Press the DELETE key to clear the selected cell. Press the SPACE key to let the solver automatically solve the Sudoku puzzle. Press the ENTER key to place the value in the selected cell and check if it's correct. If the solution is correct, "Success" will be printed to the console. Otherwise, "Wrong" will be printed, and strikes will be recorded. The time taken to solve the puzzle will be displayed on the screen. If all cells are filled correctly, "Game over" will be printed to the console.

With this Sudoku solver, you can either solve Sudoku puzzles interactively or test your own puzzle-solving skills. Happy Sudoku solving!

sudoku's People

Contributors

alsosa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.