Added several improvements IV

This commit is contained in:
Robert Vokac 2024-01-13 11:35:54 +00:00
parent 28ea4fa778
commit 325284c60b
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055

View File

@ -16,11 +16,12 @@ import java.util.Set;
public class Main {
public static void main(String[] args) {
while(true) {run(args);
System.out.println(("Do you want to continue (y/n)?"));
Scanner scanner = new Scanner(System.in);
if(args.length == 0) {
break;
}
System.out.println(("Do you want to continue (y/n)?"));
Scanner scanner = new Scanner(System.in);
if(!scanner.nextLine().equals("y")) {
System.out.println("Exiting \"Time Calc\".");
break;
@ -114,6 +115,12 @@ public class Main {
printPercentToAscii(done);
}
if(hourRemains <= 0 && minuteRemains <= 0) {
System.out.println("Congratulation :-) It is the time to go home.\n\n");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
}
break;
}