Sudoku Puzzle



Not so long ago i made a sudoku puzzle game in JavaScript using the KineticJS library.


I was interested in making such game because its quite challenging to make a solvable puzzle. especially when programming it. After many failed attempts i finally managed to generate a sudoku using PHP.

The game itself runs in the new HTML5 canvas element and uses the KineticJS library to draw to it. When you click the button to create a new sudoku it will send the generator a request to generate a new sudoku. The generator written in PHP will then generate a fully solved sudoku puzzle which he will then remove numbers from. When the generator is done with generating the sudoku it will return the puzzle as one big string where the removed numbers have been replaced with question marks. The game will receive the string and make sure it displays correctly in the canvas.

How to solve a sudoku puzzle

A sudoku puzzle has 81 cells which are mostly empty and divided in 9 rows, columns and blocks. At least 17 cells are filled but usually there are more filled. the more cells are empty the harder the sudoku is.

You can solve a puzzle by filling each cell with a number from 1 to 9 but each number can only appear once in a row, column and block.

You can try the sudoku puzzle here.

Sudoku puzzle