From e130c83cb60ace585bbc21241e368cf38e727dae Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Thu, 4 May 2023 01:11:24 -0700 Subject: [PATCH] Update the one-off solver to take the puzzle as a CLI arg --- solver.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/solver.cpp b/solver.cpp index e689e98..06b43bc 100644 --- a/solver.cpp +++ b/solver.cpp @@ -3,9 +3,11 @@ #include int main(int argc, char** argv) { - Solver solver( - "068700900004000071030809050300080100040005007007304092602001005000020600" - "059030028"); + if (argc < 2) { + std::cout << "Please provide a puzzle to solve" << std::endl; + return 1; + } + Solver solver(argv[1]); if (!solver.Solve()) { std::cout << "Error! Couldn't Solve" << std::endl; }