mirror of
https://bitbucket.org/Mattrixwv/projecteulerjava.git
synced 2025-12-06 17:13:58 -05:00
Changed how an invalid answer was handled
This commit is contained in:
@@ -77,16 +77,17 @@ public class Problem9 extends Problem{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found){
|
|
||||||
throw new Unsolved("The problem was not solved!");
|
|
||||||
}
|
|
||||||
|
|
||||||
//Stop the timer
|
//Stop the timer
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
||||||
//Throw a flag to show the problem is solved
|
//Throw a flag to show the problem is solved
|
||||||
|
if(found){
|
||||||
solved = true;
|
solved = true;
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
throw new Unsolved("The problem was not solved!");
|
||||||
|
}
|
||||||
|
}
|
||||||
//Reset the problem so it can be run again
|
//Reset the problem so it can be run again
|
||||||
@Override
|
@Override
|
||||||
public void reset(){
|
public void reset(){
|
||||||
|
|||||||
Reference in New Issue
Block a user