public void processViewCommand(Command action) {
        // Log a message
        //
        FroshProject.getLogger().log(Level.INFO,
                "Message received from the view : " + action);

        // Check if the action is set
        //
        if (action == null) {
            return;
        }

        // Switch on the possible cases
        //
        switch (action) {
        
        // Quit the application
        //
        case EXIT:
            System.exit(0);
            break;

        // Go to the next day
        //
        case NEXTDAY:
            try {
                world.processStep();
            } catch (FroshProjectException fpe) {
                handleErrorMessage(fpe);
            }
            break;

        // Initialize the simulation
        //
        case INIT:
            initializeSimulation();
            break;

        // Display statistics
        //
        case STATISTICS:
            world.getStats();
            break;
            
        // Create a new world
        //  
        case RESET:
        	initializeSimulation();
        }
    }