File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import command .Command ;
9
9
import parser .Parser ;
10
- import tasks .* ;
10
+ import tasks .TaskList ;
11
11
import ui .Ui ;
12
12
import storage .TaskFileHandler ;
13
13
@@ -20,17 +20,16 @@ public static void main(String[] args) {
20
20
public static void runDuke () {
21
21
Scanner scanner = new Scanner (System .in );
22
22
Ui .helloWorld ();
23
- boolean converse = true ;
24
- while (converse ) {
23
+ boolean isConversing = true ;
24
+ while (isConversing ) {
25
+
25
26
String rawCommand = Ui .getUserInput (scanner );
26
27
TaskList taskList = TaskFileHandler .readFromFile ();
27
28
Ui .getBotMessage ();
28
29
Command command = Parser .parse (rawCommand );
29
30
command .execute (taskList );
30
31
TaskFileHandler .saveToFile (taskList );
31
- if (command .isByeCommand ()) {
32
- converse = false ;
33
- }
32
+ isConversing = !command .isByeCommand ();
34
33
}
35
34
}
36
35
You can’t perform that action at this time.
0 commit comments