if (firstHex.getElevation() > secondHex.getElevation()) {
if (firstHex == null || secondHex == null) {  } else if (firstHex.getElevation() > secondHex.getElevation()) {
    public static Coords getMissedChargeDisplacement(Game game, int entityId, Coords src, int direction) {        Coords first = src.translated((direction + 1) % 6);        Coords second = src.translated((direction + 5) % 6);        Hex firstHex = game.board.getHex(first);        Hex secondHex = game.board.getHex(second);                        if (firstHex.getElevation() > secondHex.getElevation()) {            // leave it        } else if (firstHex.getElevation() > secondHex.getElevation()) {            // switch            Coords temp = first;            first = second;            second = temp;        } else if (random.nextFloat() > 0.5) {            // switch randomly            Coords temp = first;            first = second;            second = temp;        }                if (isValidDisplacement(game, entityId, src, src.direction(first))) {            return first;        } else if (isValidDisplacement(game, entityId, src, src.direction(second))) {            return second;        } else {            return src;        }    }