Changed how an invalid answer was handled

This commit is contained in:
2020-08-27 13:29:45 -04:00
parent 907b6fae5b
commit c40e1be88d

View File

@@ -77,15 +77,16 @@ public class Problem9 extends Problem{
}
}
if(!found){
throw new Unsolved("The problem was not solved!");
}
//Stop the timer
timer.stop();
//Throw a flag to show the problem is solved
solved = true;
if(found){
solved = true;
}
else{
throw new Unsolved("The problem was not solved!");
}
}
//Reset the problem so it can be run again
@Override