diff options
Diffstat (limited to 'src/jcgp/backend/resources/Resources.java')
-rw-r--r-- | src/jcgp/backend/resources/Resources.java | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/jcgp/backend/resources/Resources.java b/src/jcgp/backend/resources/Resources.java index d1f396a..13e0c51 100644 --- a/src/jcgp/backend/resources/Resources.java +++ b/src/jcgp/backend/resources/Resources.java @@ -266,31 +266,29 @@ public class Resources { return functionSet; } -// /* -// * Test cases -// */ -// public TestCase getTestCase(int index) { -// return testCases[index]; -// } -// -// public int getTestCaseCount() { -// return testCases.length; -// } - /* * Console functionality + * These are affected by parameter report */ - public void println(String s) { - System.out.println(s); - if (console != null) { - console.println(s); + public void reportln(String s) { + if (getInt("report") > 0) { + if (getInt("currentGen") % getInt("report") == 0) { + System.out.println(s); + if (console != null) { + console.println(s); + } + } } } - public void print(String s) { - System.out.print(s); - if (console != null) { - console.print(s); + public void report(String s) { + if (getInt("report") > 0) { + if (getInt("currentGen") % getInt("report") == 0) { + System.out.print(s); + if (console != null) { + console.print(s); + } + } } } }
\ No newline at end of file |