|
@@ -16,10 +16,9 @@ public class HolonObject extends CpsObject {
|
|
|
private float currentEnergy;
|
|
|
|
|
|
/**
|
|
|
- * State of the building: 0 = fully supplied (currentEnergy == 0) 1 = not
|
|
|
- * enough energy (currentEnergy > 0) 2 = oversupplied (currentEnergy < 0)
|
|
|
+ * true if supplied and false if not supplied
|
|
|
*/
|
|
|
- int state;
|
|
|
+ boolean supplied = false;
|
|
|
|
|
|
/**
|
|
|
* Constructor Set by default the name of the object equals to the category
|
|
@@ -43,8 +42,6 @@ public class HolonObject extends CpsObject {
|
|
|
super(obj);
|
|
|
setEleIdx(MultiPurposeController.copyHashMap(((HolonObject) obj).getEleIdx()));
|
|
|
setElements(copyElements(((HolonObject)obj).getElements()));
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -152,4 +149,19 @@ public class HolonObject extends CpsObject {
|
|
|
}
|
|
|
return newArr;
|
|
|
}
|
|
|
+
|
|
|
+ /*
|
|
|
+ * returns supplied
|
|
|
+ */
|
|
|
+ public boolean getSupplied() {
|
|
|
+ return this.supplied;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param supplied
|
|
|
+ * boolean if the Object is fully supplied
|
|
|
+ */
|
|
|
+ public void setSupplied(boolean sup) {
|
|
|
+ this.supplied = sup;
|
|
|
+ }
|
|
|
}
|