doasku

Sudoku solver
git clone git://git.dimitrijedobrota.com/doasku.git
Log | Files | Refs | README | LICENSE

main.cpp (368B)


      1 #include <iostream>
      2 #include <span>
      3 
      4 #include "grid.hpp"
      5 
      6 int main(const int argc, const char* argv[])
      7 {
      8   const std::span args(argv, static_cast<size_t>(argc));
      9 
     10   for (const auto& arg : args.subspan(1)) {
     11     grid sudoku(arg);
     12 
     13     sudoku.print();
     14     std::cout << (sudoku.solve() ? "solved" : "unable to solve") << std::endl;
     15     sudoku.print();
     16   }
     17 
     18   return 0;
     19 }