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