Skip to content

sarthak1905/sudoku-game-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku your brain!🔢

This project uses the backtrack algorithm to simulate a sudoku game(generator and solver), based on difficulty level selected by the user. Made on python.

Modules Used🧩

The majority of this project is based on the numpy module to handle integer arrays in python. However, other modules include random and sys.

Concepts Used➕

This project focuses on the practical and powerful usage of recursion, in the form of a backtracking algorithm. The program initially generates a solved sudoku puzzle subject to the rules of the game, and then selectively empties cells to create an unsolved puzzle. This is done by taking into account the difficulty level selected by the user. Care is taken to ensure that each sudoku puzzle generated by the program has only a singular, unique solution. The game currently runs on a command line interface.

Instructions to play🎮

  1. Enter the difficulty of choice.
  2. Enter the row and column you want to input the number
  3. Input the number. If correct, it'll be updated on the board. IF not, the user will be asked to repeat steps 2 and 3.
  4. If at any point you wish to surrender, you can do so and view the solution to the given puzzle.

Learning Outcomes⚽

  • Extensive usage of the numpy module helps in achieving fastn and efficient implementation of widely used algorithms such as backtrack algorithm
  • Correct handling of recursive loops helps in understanding the full potential of recursive modular functions
  • Sudoku puzzle takes into account a plethora of conditions to check while filing/unfilling of cells, which help understanding complex programming problems

Future updates✈

A future update will have a GUI based complete sudoku game, with leaderboards. Under development!

About

This project uses the backtrack algorithm to simulate a sudoku game(generator and solver), based on difficulty level selected by the user. Made on python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages