Professor Sudoku

Sudoku Puzzle game with web worker

建立方法 HTML5, CSS3, JavaScript, Web Workers

  • 189 個檢視數
  • 2 條回應

作者所寫的更多關於此 Demo 的資訊

Professor Sudoku is a sudoku puzzle game, using one web worker to compute the calculations to improve responsiveness.

With this demo, you can generate a new grid (with only 17 numbers in the grid), solve the grid, and check if the grid is solvable.

There is also a toggle button to enable/disable the web worker, so you can see that with the worker, the UI is not blocked.

Of course, the web worker is really useful only if the sudoku is hard to solve. For example, the default grid will take some time to solve. It will also depend on the power of your cpu.
You can see the time it takes to solve the grid in the console.

共有 2 條回應

登入後即可自行新增。

  1. ondras 說,

    Hi,

    your demo is nice, but the solver implementation seems to be tragically slow: a VERY old solver of mine, no web workers, finds the solution to your problem in a few milliseconds (http://ondras.zarovi.cz/demos/sudoku/), while your web worker spends many and many seconds trying to find a match. I suggest you enhance your solving algorithm...
  2. tleunen 說,

    Hi Ondras,

    Of course it's not the best solution. It's basically a bruteforce. That's why it takes some time for the default grid. (There are a lot of backtracks).

    I wanted a way to show the worker runs well.

關於此 Demo

下載原始碼 72.1 KB · ZIP 格式

Browse the Source

此 demo 係以 BSD 條款進行授權。

tleunen 的更多作品