A visually minimalist sudoku app that features on demand puzzle generation and
automatic saving and retrieving of games in progress to and from localStorage.
Additionally, it supports multiple undo using CTRL+z on a keyboard or # from
mobile and multiple redo using CTRL+y on a keyboard or * on mobile. It also
supports puzzle navigation using h (left), j (down), k (up), and l (right).
See it live https://sudoku-by-ned.netlify.app.
React, Vite, Web Workers, CSS
The most significant thing I learned in this project was how to integrate Web Workers to run computationally intensive tasks in the background to avoid interface lag for users. In this case that was generating the puzzles.
In order to avoid a lot of nested maps I implemented the board as a 1D array.
While that worked pretty well, some of the arithmetic to determine which of
the sub-blocks of 9 squares a 1D array index belonged to was more involved
than I initially figured it would be.