generating sudoku puzzles and solving them in javascript