Create Completed Sudokus with Cplusplus
Output Readme Download Replit Sel. & Copy Full

About

This repl generates completed sudokus with C++. These puzzles can be used to then create unfinished puzzles.

To view this on TripleLog, click here.

This code is an adaption of Peter Norvig's sudoku solver.

HTML

The HTML simply displays a completed sudoku puzzle.

C++

Edit the script.cpp file to change the generator. Compile with "g++ -std=c++20 -O3 script.cpp" or anything else that works. Then run "./a.out 3 3" to create a 3x3 puzzle with information stored in puzzle.js. Change the output filename from the default a.out if you wish.

If you optimize the code, you might be able to make it fast.

JavaScript

A simple script in the index.html file converts the puzzle to a pretty display.