Example #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());
 }
Example #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();
 }
Example #3
0
 /** Undefined the repair cost property. */
 public void undefineRepairCost() {
   repairCost.undefine();
 }
Example #4
0
 /** Undefine the Y property. */
 public void undefineY() {
   y.undefine();
 }
Example #5
0
 /**
  * Get the repair cost of this blockade.
  *
  * @return The repair cost.
  */
 @Override
 public int getRepairCost() {
   return repairCost.getValue();
 }
Example #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();
 }
Example #7
0
 /**
  * Get the Y coordinate.
  *
  * @return The Y coordinate.
  */
 @Override
 public int getY() {
   return y.getValue();
 }
Example #8
0
 /** Undefined the X property. */
 public void undefineX() {
   x.undefine();
 }
Example #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();
 }
Example #10
0
 /**
  * Get the X coordinate.
  *
  * @return The X coordinate.
  */
 @Override
 public int getX() {
   return x.getValue();
 }