Exemple #1
0
 // Please don't add any method here!!!!!!
 @Override
 public Pair<Integer, Integer> getLocation() {
   if (!x.isDefined() || !y.isDefined()) {
     return null;
   }
   return new Pair<Integer, Integer>(x.getValue(), y.getValue());
 }
Exemple #2
0
 /**
  * Find out if the repair cost property has been defined.
  *
  * @return True if the repair cost property has been defined, false otherwise.
  */
 public boolean isRepairCostDefined() {
   return repairCost.isDefined();
 }
Exemple #3
0
 /** Undefined the repair cost property. */
 public void undefineRepairCost() {
   repairCost.undefine();
 }
Exemple #4
0
 /** Undefine the Y property. */
 public void undefineY() {
   y.undefine();
 }
Exemple #5
0
 /**
  * Get the repair cost of this blockade.
  *
  * @return The repair cost.
  */
 @Override
 public int getRepairCost() {
   return repairCost.getValue();
 }
Exemple #6
0
 /**
  * Find out if the Y property has been defined.
  *
  * @return True if the Y property has been defined, false otherwise.
  */
 public boolean isYDefined() {
   return y.isDefined();
 }
Exemple #7
0
 /**
  * Get the Y coordinate.
  *
  * @return The Y coordinate.
  */
 @Override
 public int getY() {
   return y.getValue();
 }
Exemple #8
0
 /** Undefined the X property. */
 public void undefineX() {
   x.undefine();
 }
Exemple #9
0
 /**
  * Find out if the X property has been defined.
  *
  * @return True if the X property has been defined, false otherwise.
  */
 public boolean isXDefined() {
   return x.isDefined();
 }
Exemple #10
0
 /**
  * Get the X coordinate.
  *
  * @return The X coordinate.
  */
 @Override
 public int getX() {
   return x.getValue();
 }