@@ -21,11 +21,11 @@ public static class BrainPlus
2121 /// <param name="program">Brainfuck source code</param>
2222 /// <param name="pathName">Executable file path</param>
2323 /// <param name="fitness">IFitness</param>
24- /// <param name="maxIterations">Max number of instructions that interpreter will execute </param>
24+ /// <param name="constructorParams">Parameters to pass to fitness method constructor, after GA. </param>
2525 /// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param>
26- public static void Compile ( string program , string pathName , IFitness fitness , int maxIterations , bool includeHeader = true )
26+ public static void Compile ( string program , string pathName , IFitness fitness , string constructorParams , bool includeHeader = true )
2727 {
28- Compile ( program , pathName , fitness . GetType ( ) . Name , maxIterations ) ;
28+ Compile ( program , pathName , fitness . GetType ( ) . Name , constructorParams ) ;
2929 }
3030
3131 /// <summary>
@@ -34,9 +34,9 @@ public static void Compile(string program, string pathName, IFitness fitness, in
3434 /// <param name="program">Brainfuck source code</param>
3535 /// <param name="pathName">Executable file path</param>
3636 /// <param name="fitnessMethod">string (HelloUserFitness, StringOptimizedFitness, etc)</param>
37- /// <param name="maxIterations">Max number of instructions that interpreter will execute </param>
37+ /// <param name="constructorParams">Parameters to pass to fitness method constructor, after GA. </param>
3838 /// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param>
39- public static void Compile ( string program , string pathName , string fitnessMethod , int maxIterations , bool includeHeader = true )
39+ public static void Compile ( string program , string pathName , string fitnessMethod , string constructorParams , bool includeHeader = true )
4040 {
4141 string sourceCode = @"
4242using System;
@@ -47,7 +47,7 @@ class Program {
4747 public static void Main(string[] args)
4848 {
4949 string program = ""[SOURCE]"";
50- IFitness fitness = new [FITNESSMETHOD](null, [MAXITERATIONS], """" );
50+ IFitness fitness = new [FITNESSMETHOD](null, [PARAMETERS] );
5151
5252 [HEADER]
5353
@@ -81,7 +81,7 @@ public static void Main(string[] args)
8181
8282 sourceCode = sourceCode . Replace ( "[SOURCE]" , program ) ;
8383 sourceCode = sourceCode . Replace ( "[FITNESSMETHOD]" , fitnessMethod ) ;
84- sourceCode = sourceCode . Replace ( "[MAXITERATIONS ]" , maxIterations . ToString ( ) ) ;
84+ sourceCode = sourceCode . Replace ( "[PARAMETERS ]" , constructorParams ) ;
8585
8686 CompilerResults results = provider . CompileAssemblyFromSource ( parameters , sourceCode ) ;
8787
0 commit comments