benjstorlie / sudoku-shuffle

Play sudoku
https://mighty-ridge-19238-3e456d2c37f3.herokuapp.com/
MIT License
0 stars 0 forks source link

changed to 1 gameArray, from many array variables #24

Closed benjstorlie closed 1 year ago

benjstorlie commented 1 year ago

Now, instead of valuesArray and candidatesArray and colorsArray, there's just 1 gameArray

  /** @type {[Cell[][], React.Dispatch<React.SetStateAction<Cell[][]>>]} */
  const [gameArray , setGameArray] = useState(blankGameArray());

where blankGameArray gives a 9x9 matrix with Cell-type objects, like this


{
  value: 0,
  candidates: new Set([]), // empty set
  given: false,
  color: '',
}