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
|
||||
timer.stop();
|
||||
|
||||
//Throw a flag to show the problem is solved
|
||||
if(found){
|
||||
solved = true;
|
||||
}
|
||||
else{
|
||||
throw new Unsolved("The problem was not solved!");
|
||||
}
|
||||
}
|
||||
//Reset the problem so it can be run again
|
||||
@Override
|
||||
public void reset(){
|
||||
|
||||
Reference in New Issue
Block a user