diff options
Diffstat (limited to 'src/jcgp/function')
-rw-r--r-- | src/jcgp/function/Addition.java | 2 | ||||
-rw-r--r-- | src/jcgp/function/Subtraction.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/jcgp/function/Addition.java b/src/jcgp/function/Addition.java index 8c1e0b5..faf11d5 100644 --- a/src/jcgp/function/Addition.java +++ b/src/jcgp/function/Addition.java @@ -7,7 +7,7 @@ public class Addition extends Function { @Override public int run(Connection... connections) { if (connections.length > 0) { - return connections[0].evaluate() + connections[1].evaluate(); + return connections[0].getValue() + connections[1].getValue(); } else { return 0; } diff --git a/src/jcgp/function/Subtraction.java b/src/jcgp/function/Subtraction.java index 169f88c..f8b9c7d 100644 --- a/src/jcgp/function/Subtraction.java +++ b/src/jcgp/function/Subtraction.java @@ -7,7 +7,7 @@ public class Subtraction extends Function { @Override public int run(Connection... connections) { if (connections.length > 1) { - return connections[0].evaluate() - connections[1].evaluate(); + return connections[0].getValue() - connections[1].getValue(); } else { return 0; } |