case MapSettings.MOUNTAIN_LAKE: int lake = (width/4); int depth = ((lake - distance) +1); if(depth < 1) { depth = 1; } hex.addTerrain(tf.createTerrain(Terrains.WATER,(depth))); elev -= (Math.abs(lake - elev) -1); break;
    public static void generateMountain(IBoard board, int width,            Coords centre, int height, int capStyle) {        final int mapW = board.getWidth();        final int mapH = board.getHeight();                ITerrainFactory tf = Terrains.getTerrainFactory();                for(int x=0;x<mapW;x++) {            for(int y=0;y<mapH;y++) {                Coords c = new Coords(x,y);                int distance = c.distance(centre);                int elev = (100 * height * (width - distance))/width;                elev = (elev / 100) + (Compute.randomInt(100) < (elev % 100) ? 1 : 0);                                IHex hex = board.getHex(c);                                if(elev >= height - 2) {                    switch(capStyle) {                    case MapSettings.MOUNTAIN_SNOWCAPPED:                        hex.setTheme("snow");                        break;                    case MapSettings.MOUNTAIN_VOLCANO_ACTIVE:                    case MapSettings.MOUNTAIN_VOLCANO_DORMANT:                        hex.setTheme("lunar");                        break;                    }                }                if(elev == height) {                    //for volcanoes, invert the peak                    switch(capStyle) {                    case MapSettings.MOUNTAIN_VOLCANO_ACTIVE:                        hex.removeAllTerrains();                        hex.addTerrain(tf.createTerrain(Terrains.MAGMA,2));                        elev -= 2;                        break;                    case MapSettings.MOUNTAIN_VOLCANO_DORMANT:                        hex.removeAllTerrains();                        hex.addTerrain(tf.createTerrain(Terrains.MAGMA,1));                        elev -= 2;                        break;                    case MapSettings.MOUNTAIN_VOLCANO_EXTINCT:                        hex.setTheme("lunar");                        elev -= 2;                        break;                    }                }                                if(hex.getElevation() < elev)                    hex.setElevation(elev);            }        }                    }