package util;

import java.io.File;
import org.apache.commons.io.FileUtils;

/**
 * Class to perform copying of default library resources to game
 * 
 * @author Rahul
 *
 */
public class DefaultResourcePopulation {

    public static final String LIBRARY_DIRECTORY = "src/resources/img/graphics/buttons";
    Thread myThread;

    private void copyResources (String filePath) throws Exception {
        File libraryDirectory = new File(LIBRARY_DIRECTORY);
        File destinationDirectory = new File(filePath);
        FileUtils.copyDirectory(libraryDirectory, destinationDirectory);
        
    }

    void setDefaults (String destination) throws Exception {
        
        class Copy implements Runnable {
            String myDestination;

            Copy (String destination) {
                myDestination = destination;
            }

            public void run () {
                try {
                    copyResources(destination);
                    
                } catch (Exception e) {
                }
            }

        }
        
        myThread = new Thread(new Copy(destination));
        myThread.start();
    }
}

@@ -578,24 +578,26 @@
 ctory);%0A    
+%7D%0A
     %0A    %7D%0A%0A
@@ -589,26 +589,262 @@
  %7D%0A    %0A    
-%7D%0A
+/**%0A     * Sets a default destination to which%0A     * resources should be saved%0A     * %0A     * @param destination %0A     *        A string of the filepath that the resources%0A     *        should be saved to%0A     * @throws Exception%0A     */
 %0A    void se
@@ -893,25 +893,17 @@
 ption %7B%0A
-        
 %0A
+
         
@@ -1177,29 +1177,8 @@
 n);%0A
-                    %0A
     
@@ -1209,24 +1209,42 @@
 eption e) %7B%0A
+                %09%0A
             

improve commenting in defaultresourcepopulation.java