package harmony.mastermind.logic.commands;

import harmony.mastermind.commons.exceptions.CommandCancelledException;
import harmony.mastermind.model.TaskManager;

/**
 * Clears the task manager.
 */
public class ClearCommand extends Command {

    public static final String COMMAND_WORD = "clear";
    public static final String MESSAGE_SUCCESS = "Mastermind has been cleared!";
    public static final String COMMAND_SUMMARY = "Clearing current tab's tasks:"
            + "\n" + COMMAND_WORD;

    public ClearCommand() {}


    @Override
    public CommandResult execute() {
        assert model != null;
        try {
            confirmWithUser();
        } catch (CommandCancelledException cce) {
            
        }
        
        model.resetData(TaskManager.getEmptyTaskManager());
        return new CommandResult(MESSAGE_SUCCESS);
    }


    private void confirmWithUser() throws CommandCancelledException {
        // TODO Auto-generated method stub
        
    }
}

@@ -487,16 +487,82 @@
 ND_WORD;
+%0A    public static final String MESSAGE_FAIL = %22No changes made.%22;
 %0A%0A    pu
@@ -766,32 +766,71 @@
 ) %7B%0A            
+return new CommandResult(MESSAGE_FAIL);
 %0A        %7D%0A     
@@ -948,24 +948,24 @@
 S);%0A    %7D%0A%0A%0A
+
     private 
@@ -1026,51 +1026,8 @@
 n %7B%0A
-        // TODO Auto-generated method stub%0A
     

add message fail string