/// <summary>
        /// Use this constructor to generate the swing spawner
        /// Swing spawner object is InterfaceController.generationControllerToUse
        /// </summary>
        /// <param name="moduleToUse">Name of the chosen module. Will be an element of the Modules List, defined above</param>
        /// <param name="inputlength">Number of available inputs to the neural net</param>
        /// <param name="outputlength">Number of expected output options the net can take</param>
        public InterfaceController(string moduleToUse, int inputlength, int outputlength)
        {
            switch (moduleToUse)
            {
            case "deepQ":
                break;

            case "testExample":
                generationControllerToUse = new TestController(inputlength, outputlength);
                break;

            default:
                generationControllerToUse = new TestController(inputlength, outputlength);
                break;
            }
        }
    /// <summary>
    /// Constructor for class
    /// </summary>
    /// <param name="method">String name for the "method" algorithm to be used</param>
    /// <param name="spawnObject">GameObject responsible for spawning the Swingers</param>
    /// <param name="Swing">Swing GameObject to be spawned</param>
    /// <param name="fitnessFuncToUse">Fitness function to be used when determining reward</param>
    /// <param name="PopulationSize">Total population of each generation</param>
    /// <param name="startGeneration">Generation to start at (when loading from a saved state)</param>
    /// <param name="startEntities">EntityControllers loaded from a saved state</param>
    public void Construct(string method, GameObject spawnObject, GameObject Swing, FitnessFunctions.FitnessFunctionDelegate fitnessFuncToUse, int PopulationSize, int startGeneration = 0, List <EntityController> startEntities = null)
    {
        fitness = fitnessFuncToUse;
        Method  = method;
        int inputLength  = Swing.transform.Find("Swing").gameObject.GetComponentsInChildren <HingeJoint2D>().Length * 2;
        int outputLength = Swing.transform.Find("Robot").gameObject.GetComponentsInChildren <HingeJoint2D>().Length;
        InterfaceController interfaceController = new InterfaceController(method, inputLength, outputLength);

        generationController = interfaceController.GetGenMethod();
        spawner     = spawnObject;
        generations = startGeneration;
        if (startEntities != null)
        {
            foreach (EntityController e in startEntities)
            {
                entities.Add(e.swingAI);
            }
        }
        swing   = Swing;
        PopSize = PopulationSize;
    }