|
@@ -175,8 +175,8 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
|
|
|
g2.setStroke(new BasicStroke(1));
|
|
|
g2.drawLine((model.getCurIteration()) * this.getWidth() / (model.getIterations() - 1), 0,
|
|
|
(model.getCurIteration()) * this.getWidth() / (model.getIterations() - 1), this.getHeight());
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
controller.calculateStateForTimeStep(model.getCurIteration());
|
|
|
}
|
|
|
|
|
@@ -584,14 +584,7 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
|
|
|
MAXIMUM = he.getEnergy();
|
|
|
he.setGraphPoints((LinkedList<Point>) pointList.clone());
|
|
|
for (int i = 0; i < arrayOfFloats.length; i++) {
|
|
|
- if (he.getEnergy() >= 0) {
|
|
|
- he.getEnergyAt()[i] = convertToValueY(
|
|
|
- getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
|
|
|
- } else {
|
|
|
- he.getEnergyAt()[i] = -convertToValueY(
|
|
|
- getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
|
|
|
- }
|
|
|
-
|
|
|
+ he.getEnergyAt()[i] = convertToValueY(getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
|
|
|
}
|
|
|
arrayOfFloats = he.getEnergyAt();
|
|
|
}
|