Make A Sudoku Game

Posted on: May 09, 2023

This blog post talks about my 9x9 Sudoku game. It is deployed via Firebase: Wenyu'z Sudoku Game

Issues and Improvements To Be Done

  • The poked puzzle may have more than one solution. Especially when the difficulty level is hard that there are more holes in the puzzle, the puzzle might not be logically solved.
  • For better user experience, we could add some more features:
    • A timer
    • A hint function
    • An indication for wrong number input

Generate A Complete 9x9 Sudoku Puzzle

  1. Make an array of 9 arrays that each array contains nine 0s, this is going to be our initial puzzle.
  2. Write a recursive function genFilledPuzzle which takes the 9x9 puzzle as argument.
  3. Inside the genFilledPuzzle function, we find the next 0 from the puzzle and get its coordinate as [i, j].