示例#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;
 }
示例#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;
 }
示例#3
0
 public static CoordinateMapKey getCurrentCellKey(LCSCell lcsCell) {
   CoordinateMapKey key = null;
   if (lcsCell != null) {
     key = new CoordinateMapKey(lcsCell.getXCoordinate(), lcsCell.getYCoordinate());
   }
   return key;
 }