if (deltaX >= -1 && deltaX <= 1 && deltaY >= -1 && deltaY <= 1) {
if ((deltaX != 0 || deltaY != 0) && deltaX >= -1 && deltaX <= 1 && deltaY >= -1 && deltaY <= 1) {
    public void tryMoveCursor(Point tryThisPoint) {        message = null;        float tileSize = mapView.getScale();        Dimension mapSizeInPixels = mapView.getMapSizeInPixels();        int maxX = (int)(mapSizeInPixels.width / tileSize) - 2;        int maxY = (int)(mapSizeInPixels.height / tileSize) - 2;        Rectangle legalRectangle; //The set of legal cursor positions.        legalRectangle = new Rectangle(1, 1, maxX, maxY);        if (legalRectangle.contains(tryThisPoint)) {            /*Move the cursor. */            oldCursorMapPosition.setLocation(cursorMapPosition);            cursorMapPosition.setLocation(tryThisPoint);            int deltaX = cursorMapPosition.x - oldCursorMapPosition.x;            int deltaY = cursorMapPosition.y - oldCursorMapPosition.y;            /*Build track! */            if (deltaX >= -1 && deltaX <= 1 && deltaY >= -1 && deltaY <= 1) {		fireOffCursorOneTileMove		    (CompassPoints.unitDeltasToDirection(deltaX,			    deltaY), oldCursorMapPosition);            } else {                fireOffCursorJumped(oldCursorMapPosition, cursorMapPosition);            }        } else {            this.message = "Illegal cursor position!";        }    }