Skip to content

Commit

Permalink
Change message texts
Browse files Browse the repository at this point in the history
  • Loading branch information
DextheChik3n committed Sep 14, 2023
1 parent 8516950 commit 8bc1e58
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
29 changes: 17 additions & 12 deletions src/main/java/alan/Alan.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,24 @@ public class Alan {
public static int currentTasksIndex = 1;

public static void printGreetingMessage() {
printHorizontalLine();
String manDrawing = " @/\n" +
"/| \n" +
"/ \\";
"/| \n" +
"/ \\";
String alanText = " ______ __ ______ __ __ \n" +
"/\\ __ \\ /\\ \\ /\\ __ \\ /\\ \"-.\\ \\ \n" +
"\\ \\ __ \\ \\ \\ \\____ \\ \\ __ \\ \\ \\ \\-. \\ \n" +
" \\ \\_\\ \\_\\ \\ \\_____\\ \\ \\_\\ \\_\\ \\ \\_\\\\\"\\_\\ \n" +
" \\/_/\\/_/ \\/_____/ \\/_/\\/_/ \\/_/ \\/_/ ";

String greetMessage = "Sup dude! I'm \n" + alanText + "\n" + manDrawing + "\n" + "What can I do for you, my man?";

System.out.println(manDrawing);
System.out.println("Hello! I'm Alan");
System.out.println("What can I do for you?");
printHorizontalLine();
System.out.println(greetMessage);
printHorizontalLine();
}

public static void printExitMessage() {
System.out.println("Bye. Hope to see you again soon!");
System.out.println("Later, dude! Can't wait to catch up again real soon!");
}

public static void printHorizontalLine() {
Expand All @@ -34,14 +39,14 @@ public static void printHorizontalLine() {

public static void printTaskAddedMessage(Task[] tasks, int currentTasksIndex) {
System.out.println("added: " + tasks[currentTasksIndex]);
System.out.println("Now you have " + currentTasksIndex + " in the list.");
System.out.println("Dude! You've got a solid " + currentTasksIndex + " tasks lined up on your list now!");
}

public static void processCommandHandler(String userInput, Task[] tasks) throws AlanExceptions {
String[] userInputWords = userInput.split(" ");
String command = userInputWords[0];

if (command.equals("bye")) {
if (command.equals("bye")) { //todo: change todo switch case
printExitMessage();
} else if (command.equals("list")) {
//print the tasks in the lists
Expand Down Expand Up @@ -73,7 +78,7 @@ public static void processCommandHandler(String userInput, Task[] tasks) throws
}

public static void listCommandHandler(Task[] tasks, int currentTasksIndex) {
System.out.println("Here are the tasks in your list:");
System.out.println("Dude, check out these tasks on your list:");

for (int i = 1; i < currentTasksIndex; i++) {
System.out.print((i) + ". ");
Expand All @@ -89,10 +94,10 @@ public static void markingCommandHandler(String userInput, Task[] tasks, boolean

if (isMark) {
tasks[selectedTaskIndex].setDone(true);
System.out.println("Alright! I've marked this task as done:");
System.out.println("Alright bro! This task is officially checked off:");
} else {
tasks[selectedTaskIndex].setDone(false);
System.out.println("Ok, I've marked this task as not done yet:");
System.out.println("Ok dude, I've marked this task as ain't done yet amigo:");
}

System.out.println(tasks[selectedTaskIndex]);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/alan/AlanExceptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

public class AlanExceptions extends Exception {
public static final String INVALID_INPUT_COMMAND_MESSAGE = "Oof, I have no idea what are you saying duuude";
public static final String EMPTY_DESCRIPTION_MESSAGE = "Oof Dude, you can't leave the description empty, man";
public static final String EMPTY_DESCRIPTION_MESSAGE = "Oof Dude, you can't leave the description empty";
public static final String INVALID_DEADLINE_FORMAT_MESSAGE = "Oof the deadline command isn't quite right you gotta fix the format, bro...\nRemember it's: <description> /by <date>";
public static final String INVALID_EVENT_FROM_FORMAT_MESSAGE = "Oof duude, your /from formatting is whack";
public static final String INVALID_EVENT_TO_FORMAT_MESSAGE = "Oof my man, you need to work on that /to formatting";
public static final String INVALID_TASK_NUMBER_MESSAGE = "Hey man there's no such task";
public static final String INVALID_EVENT_FROM_FORMAT_MESSAGE = "Oof duude, your /from formatting is whack\nRemember it's: <description> /from <date> /to <date>";
public static final String INVALID_EVENT_TO_FORMAT_MESSAGE = "Oof my man, you need to work on that /to formatting\nRemember it's: <description> /from <date> /to <date>";
public static final String INVALID_TASK_NUMBER_MESSAGE = "Oof maaaan there's no such task";
public AlanExceptions(String errorMessage) {
super(errorMessage);
}
Expand Down

0 comments on commit 8bc1e58

Please sign in to comment.