I created a Sudoku game in Python using the Pygame library for the graphical interface as part of my coursework project on algorithms and data structures. Below are the instructions on how to compile and execute the provided code.
### Prerequisites:
- Latest version of Python installed on your system
- Pygame library installed (install via pip:
`pip install pygame`)
### Instructions:
1. **Download the Code**: Save the provided Python script named "sudoku.py" to your local machine.
2. **Install Python**: Ensure you have Python installed on your system. Download it from the official website: [Python Downloads](https://www.python.org/downloads/).
3. **Install Pygame**: Open your terminal or command prompt and run:
``
pip install pygame
`’
4. **Navigate to the Script**: Use the terminal or command prompt to navigate to the directory where you saved "sudoku.py".
5. **Run the Game**: Execute the Python script by typing:
```
python sudoku.py
```
6. **Play the Game**: The Sudoku game window will open, and you can interact using your mouse and keyboard. Features include starting a new game, selecting difficulty levels (easy, medium, hard), inputting numbers, solving the puzzle, undoing moves, and quitting the game.
7. **Resize Window if Needed**: Ensure the game window fits your screen properly by resizing it if necessary.
If you have any issues or questions, feel free to contact me at bhusalparvat@gmail.com.
Happy Sudoku solving!
Comments
Post a Comment