Commit Graph

6 Commits

Author SHA1 Message Date
a66a20b647 Cell = number instead of object, return flat array 2021-02-23 18:19:57 -07:00
c16a68e796 Use 0 instead of null to represent no value 2021-02-23 16:50:17 -07:00
09f740f86a Add cors 2021-02-23 16:47:58 -07:00
8f3217f3cc Implement Algorithm X for solving and generating sudokus 2021-02-22 20:03:47 -07:00
7ac3e6ad06 Use worker threads for sudoku generation
Moves sudoku generation off of the main thread. Allows for multiple
generation requests (up to the number of physical CPU cores) to be
served in parallel. Uses the "physical-cpu-count" node package to
determine the numer of physical CPUs of the host.

Also introduces a timeout which causes too-difficult (or impossible)
generation requests to fail if they take more than 5 seconds to
complete. In effect soft-capping the complexity of generated puzzles.
2021-02-20 18:57:18 -07:00
7f9cffbfdd initial commit 2021-02-19 23:55:49 -07:00