aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/population/GUINode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/gui/population/GUINode.java')
-rw-r--r--src/jcgp/gui/population/GUINode.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jcgp/gui/population/GUINode.java b/src/jcgp/gui/population/GUINode.java
index 98ba738..8e2d8a0 100644
--- a/src/jcgp/gui/population/GUINode.java
+++ b/src/jcgp/gui/population/GUINode.java
@@ -42,10 +42,10 @@ public class GUINode extends GUIGene {
text.setText(node.getFunction().getName());
- Circle[] sockets = new Circle[GUI.resources.getInt("arity")];
+ Circle[] sockets = new Circle[GUI.resources.arity()];
double angle, xPos, yPos;
for (int l = 0; l < sockets.length; l++) {
- angle = (((l + 1) / ((GUI.resources.getDouble("arity") + 1))) * THETA) - (THETA / 2);
+ angle = (((l + 1) / ((double) (GUI.resources.arity() + 1))) * THETA) - (THETA / 2);
xPos = -Math.cos(angle) * NODE_RADIUS;
yPos = Math.sin(angle) * NODE_RADIUS;
@@ -316,7 +316,7 @@ public class GUINode extends GUIGene {
} else if (target instanceof GUINode) {
// target and source are nodes, let's look at levels back
Node t = ((GUINode) target).getGene(), s = ((GUINode) source).getGene();
- if (s.getColumn() - t.getColumn() > 0 && s.getColumn() - t.getColumn() <= GUI.resources.getInt("levelsBack")) {
+ if (s.getColumn() - t.getColumn() > 0 && s.getColumn() - t.getColumn() <= GUI.resources.levelsBack()) {
return true;
}
return false;