Esempio n. 1
0
 public static Direction getMovedDirection(LCSCell from, LCSCell to) {
   Direction direction = null;
   if (from != null && to != null) {
     direction =
         Direction.getDirection(
             from.getXCoordinate(),
             from.getYCoordinate(),
             to.getXCoordinate(),
             to.getYCoordinate());
   }
   return direction;
 }
Esempio n. 2
0
 public static CoordinateMapKey getDiagnalCellKey(LCSCell lcsCell) {
   CoordinateMapKey key = null;
   if (lcsCell != null) {
     key = new CoordinateMapKey(lcsCell.getXCoordinate() - 1, lcsCell.getYCoordinate() - 1);
   }
   return key;
 }
Esempio n. 3
0
 public static CoordinateMapKey getCurrentCellKey(LCSCell lcsCell) {
   CoordinateMapKey key = null;
   if (lcsCell != null) {
     key = new CoordinateMapKey(lcsCell.getXCoordinate(), lcsCell.getYCoordinate());
   }
   return key;
 }