Skip to content

Commit 06432f2

Browse files
authored
Merge pull request #11 from tjingsheng/add-a-jar
add-a-jar
2 parents 776fc02 + b92c5ba commit 06432f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main/java/duke/Duke.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import command.Command;
99
import parser.Parser;
10-
import tasks.*;
10+
import tasks.TaskList;
1111
import ui.Ui;
1212
import storage.TaskFileHandler;
1313

@@ -20,17 +20,16 @@ public static void main(String[] args) {
2020
public static void runDuke() {
2121
Scanner scanner = new Scanner(System.in);
2222
Ui.helloWorld();
23-
boolean converse = true;
24-
while (converse) {
23+
boolean isConversing = true;
24+
while (isConversing) {
25+
2526
String rawCommand = Ui.getUserInput(scanner);
2627
TaskList taskList = TaskFileHandler.readFromFile();
2728
Ui.getBotMessage();
2829
Command command = Parser.parse(rawCommand);
2930
command.execute(taskList);
3031
TaskFileHandler.saveToFile(taskList);
31-
if (command.isByeCommand()) {
32-
converse = false;
33-
}
32+
isConversing = !command.isByeCommand();
3433
}
3534
}
3635

0 commit comments

Comments
 (0)