From 8b052a3144a9419dc59b0cb132b67cf9c379b261 Mon Sep 17 00:00:00 2001 From: Ayeong Kwon Date: Thu, 11 Dec 2025 12:25:56 +0900 Subject: [PATCH 1/2] feat: introduce visually Intro Screen --- IntroScreen.java | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 IntroScreen.java diff --git a/IntroScreen.java b/IntroScreen.java new file mode 100644 index 0000000..c26f988 --- /dev/null +++ b/IntroScreen.java @@ -0,0 +1,87 @@ +public class IntroScreen { + + private static final String ANSI_RESET = "\u001b[0m"; + private static final String ANSI_BOLD = "\u001b[1m"; + private static final String ANSI_CYAN = "\u001b[38;5;51m"; + private static final String ANSI_GREEN = "\u001b[38;5;46m"; + private static final String ANSI_YELLOW = "\u001b[38;5;226m"; + private static final String[] ANSI_COLORS = { + "\u001b[38;5;196m", + "\u001b[38;5;208m", + "\u001b[38;5;220m", + "\u001b[38;5;46m", + "\u001b[38;5;51m", + "\u001b[38;5;93m" + }; + private static final int NUM_COLORS = ANSI_COLORS.length; + private static final int WIDTH = 80; + + public static void main(String[] args) { + 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)); + } + + private static void printBorderedBox() { + String h_border = "+-" + "-".repeat(WIDTH) + "-+"; + String emptyLine = "| " + " ".repeat(WIDTH) + " |"; + + System.out.println(h_border); + + String title = " ♬ UniTime-Solver Dashboard"; + int currentLength = title.length(); + int padding = WIDTH - currentLength; + + System.out.println("| " + ANSI_CYAN + ANSI_BOLD + title + ANSI_RESET + " ".repeat(padding) + " |"); + System.out.println(h_border); + + String status = " Status: [ **DONE** ]"; + int statusPadding = WIDTH - status.length(); + + System.out.println("| " + ANSI_GREEN + status + ANSI_RESET + " ".repeat(statusPadding) + " |"); + System.out.println(h_border); + + String[] logo = { + " _ _ _ _____ _ ____ _ ", + + " | | | |_ __ (_)_ _ (_)_ __ ___ ___ / ___| ___ | |_ ______ __ ", + + " | | | | '_ \\| | | | | | '_ ` _ \\ / _ \\____\\___ \\ / _ \\| \\ \\ / /_ \\ '__|", + + " | |_| | | | | | | | | | | | | | | __/_____|__) | (_) | |\\ V / __/ | ", + + " \\____/|_| |_|_| |_| |_|_| |_| |_|\\___| |____/ \\___/|_| \\_/\\___|_| " + }; + + final int MAX_LOGO_WIDTH = 72; + + System.out.println(emptyLine); + + for (int i = 0; i < logo.length; i++) { + String line = logo[i]; + + int leftPadding = (WIDTH - MAX_LOGO_WIDTH) / 2; + + System.out.print("| " + " ".repeat(leftPadding)); + + int printableWidth = Math.min(line.length(), MAX_LOGO_WIDTH); + + for (int j = 0; j < printableWidth; j++) { + char c = line.charAt(j); + + int colorIndex = (i + j) % NUM_COLORS; + + + System.out.print(ANSI_COLORS[colorIndex] + c + ANSI_RESET); + } + + int rightPadding = WIDTH - leftPadding - printableWidth; + System.out.println(" ".repeat(rightPadding) + " |"); + } + + System.out.println(emptyLine); + System.out.println(h_border); + } +} \ No newline at end of file From 88562adc5d4c8472c4dd9e2eb7ad8b18be59a7eb Mon Sep 17 00:00:00 2001 From: Ayeong Kwon Date: Thu, 11 Dec 2025 14:43:45 +0900 Subject: [PATCH 2/2] UI: Clarify status text to Ready to Start --- IntroScreen.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/IntroScreen.java b/IntroScreen.java index c26f988..7b8165a 100644 --- a/IntroScreen.java +++ b/IntroScreen.java @@ -1,8 +1,6 @@ public class IntroScreen { - private static final String ANSI_RESET = "\u001b[0m"; private static final String ANSI_BOLD = "\u001b[1m"; - private static final String ANSI_CYAN = "\u001b[38;5;51m"; private static final String ANSI_GREEN = "\u001b[38;5;46m"; private static final String ANSI_YELLOW = "\u001b[38;5;226m"; private static final String[] ANSI_COLORS = { @@ -30,16 +28,17 @@ private static void printBorderedBox() { System.out.println(h_border); - String title = " ♬ UniTime-Solver Dashboard"; + String title = " ♬ UniTime-Solver"; int currentLength = title.length(); int padding = WIDTH - currentLength; - System.out.println("| " + ANSI_CYAN + ANSI_BOLD + title + ANSI_RESET + " ".repeat(padding) + " |"); + System.out.println("| " + ANSI_BOLD + title + ANSI_RESET + " ".repeat(padding) + " |"); System.out.println(h_border); - String status = " Status: [ **DONE** ]"; + String status = " Status: [ *READY to START* ]"; int statusPadding = WIDTH - status.length(); + System.out.println("| " + ANSI_GREEN + status + ANSI_RESET + " ".repeat(statusPadding) + " |"); System.out.println(h_border);