int tryX = (int) (mapCoords.getIntX() + xDelta);
int tryY = (int) (mapCoords.getIntY() + yDelta);
Tile tryTile;
if ((tryX > 0) && (tryX <= onMap.sizeX)
&& (tryY > 0) && (tryY <= onMap.sizeY)) {
tryTile = onMap.getTile(tryX, tryY);
} else {
tryTile = null;
}
//Log.info("TryY "+tryY);
//Log.info("Map sizeY "+onMap.sizeY);
if (onMap.returnTileUnit(tryX, tryY, 0) == null) {
collidedUnit = null;
} else {
collidedUnit = tryTile.units.get(0);
}
return ((tryTile != null)
&& (collidedUnit == null)
&& (tryTile.isMoveable()));
}