Skip to content

Commit

Permalink
edited Ui.png
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnlow175 committed Sep 21, 2023
1 parent 0dc22f9 commit 4345771
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion data/duke.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
event project meeting /from Mon 2pm /to 4pm
todo read book
Binary file modified docs/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/java/duke/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

Expand All @@ -14,7 +15,6 @@
public class Main extends Application {

private Duke duke = new Duke();

@Override
public void start(Stage stage) {
try {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/duke/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void initialize() {

public void setDuke(Duke d) {
duke = d;
dialogContainer.getChildren().add(DialogBox.getDukeDialog(Ui.printGreetings(), dukeImage));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/duke/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Parser {
*/
public static String handleInput(String input, TaskList taskList, Boolean isLoading) {
if (input.equals("bye")) {
return "";
return Ui.printBYE();
}
if (input.startsWith("mark") || input.startsWith("unmark ")) {
return handleMark(input, taskList, isLoading);
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/duke/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ public static String scanInput() {

/**
* Prints to standard output a greeting message.
*
* @return
*/
public static void printGreetings() {
System.out.println("Hello! I'm lippy the wombat\n" + "What can I do for you?");
public static String printGreetings() {
return "Hello! I'm lippy the cute bear\n" + "What can I do for you?";
}

/**
* Prints to an input bye.
*/
public static void printBYE() {
System.out.println("Bye. Hope to see you again soon!");
public static String printBYE() {
return "Bye. Hope to see you again soon!";
}

/**
Expand Down

0 comments on commit 4345771

Please sign in to comment.