فهرست منبع

Fixed internal crash when jumping forward further than iteration 100.

This bug was caused by the code structure. Should maybe refactor this
once I am dealing with graphs.
Ludwig Tietze 6 سال پیش
والد
کامیت
c36e106c8f
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/classes/HolonElement.java

+ 1 - 1
src/classes/HolonElement.java

@@ -151,7 +151,7 @@ public class HolonElement {
      * Get the energyPerElement currently available
      */
     public float getAvailableEnergyAt(int timestep) {
-        return this.availableEnergyPerElementAt[timestep];
+        return this.availableEnergyPerElementAt[timestep%100];//TODO: Since I added the modulo twice, something could be refactored here.
     }
 
     /**