Skip to content

Commit

Permalink
Merge pull request #251 from CS2103AUG2016-W11-C3/Refactoring_and_add…
Browse files Browse the repository at this point in the history
…ing_authors_Hui_Qi

Refactoring and adding authors hui qi
  • Loading branch information
LuMiN0uSaRc authored Nov 7, 2016
2 parents 788b6ce + 7905e78 commit 295e334
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/main/java/harmony/mastermind/logic/commands/ListCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ private static String formatList(ArrayList<GenericMemory> list) {
String result = listName + "\n" + LINE;
for (int i=0; i < list.size(); i++) {
String line = i + 1 + BRACKET_OPEN;
line = markSymbol(list, i, line);
line += BRACKET_CLOSE + list.get(i).getName();

result = result + "\n" + line;
Expand All @@ -128,20 +127,6 @@ private static String formatList(ArrayList<GenericMemory> list) {
return result;
}

//@author A0143378Y
// Selects and prints the appropriate marking symbol
private static String markSymbol(ArrayList<GenericMemory> list, int i,
String line) {
if (list.get(i).getState() == 1) { // show marking for overdue/over items
line += MARK;
} else if (list.get(i).getState() == 2) { // show alert marking for overdue/ongoing items
line += ALERT;
} else { // show blank space for upcoming/incomplete items
line+= BLANK;
}
return line;
}

//@author A0143378Y
// Displays list of item with the corresponding type
public static void displayType(ArrayList<GenericMemory> list, String type) {
Expand All @@ -153,13 +138,4 @@ public static void displayType(ArrayList<GenericMemory> list, String type) {
displayDetailed(list.get(0));
}
}

//@author A0143378Y
// Redisplays item view or list view to reflect changes such as updates, marks, or deletes
public static void refreshDisplay() {
if(detailedView != null) {
displayDetailed(detailedView);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public void test() {
test_isUselessCommand();
}

//@@author A0143378Y
private void test_set() {
ParserMemoryMain.setCommand("test1");
assertEquals("Test set command", ParserMemoryMain.getCommand(), "test1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public void test() {
testInit();
}

//@@author A0143378Y
private void testInit() {
ParserSearch search = null;
search.initVar();
Expand Down

0 comments on commit 295e334

Please sign in to comment.