From 6e4dd457022bcb1fd3888335fbb8b14ffadb123b Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Wed, 14 Jul 2021 15:38:06 -0400 Subject: [PATCH] Updated to use new solve checking function --- headers/Problem.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/headers/Problem.hpp b/headers/Problem.hpp index 026dbbc..9a1dfb2 100644 --- a/headers/Problem.hpp +++ b/headers/Problem.hpp @@ -55,18 +55,12 @@ public: } //Get the time it took to run the algorithm as a string virtual std::string getTime(){ - //If the problem hasn't been solved throw an exception - if(!solved){ - throw Unsolved(); - } + solvedCheck("time it took to run the algorithm"); return timer.getStr(); } //Get a copy of the timer that was used to time the algorithm virtual mee::Stopwatch getTimer(){ - //If the problem hasn't been solved throw an exception - if(!solved){ - throw Unsolved(); - } + solvedCheck("timer"); return timer; } //Reset the problem so it can be run again