Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/main/java/com/unitime/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
import java.util.List;
import java.util.Scanner;


import com.unitime.UI.IntroScreen;
import com.unitime.UI.ResultView;
import com.unitime.feature.InputHandler;
import com.unitime.algorthm.Scheduler;
import com.unitime.feature.Course;
import com.unitime.algorthm.Scheduler;
import com.unitime.feature.InputHandler;

public class App {
public static void main( String[] args ) {

Scanner sc = new Scanner(System.in);

System.out.println("\n=== Welcome to UniTime-Solver! ===");
IntroScreen.start();
System.out.println("Press [ENTER] to start...");
sc.nextLine();

while(true) {

InputHandler inputHandler = new InputHandler();
Expand All @@ -42,6 +40,7 @@ public static void main( String[] args ) {
if (currentIndex + 5 < results.size()) {
currentIndex += 5;
} else {

}
}
else if (command.equals("edit")) {
Expand All @@ -50,4 +49,5 @@ else if (command.equals("edit")) {
}
}
}

}
10 changes: 2 additions & 8 deletions src/main/java/com/unitime/UI/IntroScreen.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import java.util.Scanner;
package com.unitime.UI;

public class IntroScreen {
//set color for introscreen
Expand All @@ -17,20 +17,14 @@ public class IntroScreen {
private static final int NUM_COLORS = ANSI_COLORS.length;
private static final int WIDTH = 80;

public static boolean start() {
public static void start() {
printBorderedBox();

System.out.println("=".repeat(WIDTH + 4));
System.out.println(ANSI_YELLOW + " Press [ENTER] to Start UniTime_Solver." + ANSI_RESET);
System.out.println("=".repeat(WIDTH + 4));

//waiting user's enter
try (Scanner scanner = new Scanner(System.in)) {
scanner.nextLine();
return true; //if user's enter succeed
}catch (Exception e) {
return false; //else
}
}

private static void printBorderedBox() {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/unitime/UI/ResultView.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

import com.unitime.feature.Course;

public class ResultView {
Expand Down