亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? castleinfinity.java

?? good project for programmer,,
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
      if(!hasNeighborInContinent) {        removeHexagon((Polygon)countryPolygons.get(i));        i -= 1;      }    }    //draw land borders between continents    //for each pair of polygons    //  if they are in two different continents and two of their sides are right next to each other    //  draw a thick white line along those sides    foreG.setColor(Color.white);    foreG.setStroke(new BasicStroke(5));    for(int ip = 0; ip < countryPolygons.size(); ip += 1) {      Polygon p = (Polygon)countryPolygons.get(ip);      int pClosestCastle = closestCastle(p);      for(int jn = 0; jn < ((Vector)connections.get(ip)).size(); jn += 1) {        Polygon n = (Polygon)(((Vector)connections.get(ip)).get(jn));        if(countryPolygons.contains(n) && pClosestCastle != closestCastle(n)) { //countryside border          for(int i = 0; i < p.npoints; i += 1) {            for(int j = 0; j < n.npoints; j += 1) {              if(dist(new Point(p.xpoints[i], p.ypoints[i]),                      new Point(n.xpoints[j], n.ypoints[j])) < 10) {                for(int iOff = -1; iOff <= 1; iOff += 2) {                  int i2 = (i+iOff+p.npoints)%p.npoints;                  for(int jOff = -1; jOff <= 1; jOff += 2) {                    int j2 = (j+jOff+n.npoints)%n.npoints;                    if(dist(new Point(p.xpoints[i2], p.ypoints[i2]),                            new Point(n.xpoints[j2], n.ypoints[j2])) < 10) {                      foreG.draw(new Line2D.Double((p.xpoints[i]+n.xpoints[j])/2, height - (p.ypoints[i]+n.ypoints[j])/2,                                                   (p.xpoints[i2]+n.xpoints[j2])/2, height - (p.ypoints[i2]+n.ypoints[j2])/2));                      out.println("<line><position>" + (p.xpoints[i]+n.xpoints[j])/2 +"," + (p.ypoints[i]+n.ypoints[j])/2 + " " +                                                    (p.xpoints[i2]+n.xpoints[j2])/2 + "," + (p.ypoints[i2]+n.ypoints[j2])/2 +                                         "</position><above>true</above></line>");                    }                  }                }              }            }          }        }      }    }  }  //create the polygons and connections of a bridge between hex a and hex b.  private void makeBridgeBetween(Polygon a, Polygon b) {    //line between hexagons' midpoints    Line2D.Double line = drawLineBetween(a, b);    //don't make tiny bridges    if(dist(new Point((int)line.x1, (int)line.y1), new Point((int)line.x2, (int)line.y2)) < 20) {      return;    }    double lineAngle = Math.atan2(line.y2 - line.y1, line.x2 - line.x1);    double ang = lineAngle + Math.PI/2;    double midX = (line.x2 + line.x1)/2;    double midY = (line.y2 + line.y1)/2;    //if a contracted version of the bridge intersects a polygon that is not    //a or b, don't draw the bridge, as it will look funny    Line2D.Double shortenedSide1 =        new Line2D.Double(midX - 20*Math.cos(ang) - (line.x2 - line.x1)/4,                          midY - 20*Math.sin(ang) - (line.y2 - line.y1)/4,                          midX - 20*Math.cos(ang) + (line.x2 - line.x1)/4,                          midY - 20*Math.sin(ang) + (line.y2 - line.y1)/4);    Line2D.Double shortenedSide2 =        new Line2D.Double(midX + 20*Math.cos(ang) - (line.x2 - line.x1)/4,                          midY + 20*Math.sin(ang) - (line.y2 - line.y1)/4,                          midX + 20*Math.cos(ang) + (line.x2 - line.x1)/4,                          midY + 20*Math.sin(ang) + (line.y2 - line.y1)/4);    for(int i = 0; i < countryPolygons.size(); i += 1) {      Polygon p = (Polygon)countryPolygons.get(i);      if(p != a && p != b && (lineIntersectsPolygon(shortenedSide1, p) ||                              lineIntersectsPolygon(shortenedSide2, p) ||                              p.contains(shortenedSide1.x1, shortenedSide1.y1) ||                              p.contains(shortenedSide1.x2, shortenedSide1.y2) ||                              p.contains(shortenedSide2.x1, shortenedSide2.y1) ||                              p.contains(shortenedSide2.x2, shortenedSide2.y2)))        return; //bridge intersects some other polygon, don't make it    }    Polygon aPart = new Polygon(); //side touching a    aPart.addPoint((int)(line.x1 + 20*Math.cos(ang)), (int)(line.y1 + 20*Math.sin(ang)));    aPart.addPoint((int)(line.x1 - 20*Math.cos(ang)), (int)(line.y1 - 20*Math.sin(ang)));    aPart.addPoint((int)(midX - 20*Math.cos(ang)), (int)(midY - 20*Math.sin(ang)));    aPart.addPoint((int)(midX + 20*Math.cos(ang)), (int)(midY + 20*Math.sin(ang)));    Polygon bPart = new Polygon(); //side touching b    bPart.addPoint((int)(midX - 20*Math.cos(ang)), (int)(midY - 20*Math.sin(ang)));    bPart.addPoint((int)(midX + 20*Math.cos(ang)), (int)(midY + 20*Math.sin(ang)));    bPart.addPoint((int)(line.x2 + 20*Math.cos(ang)), (int)(line.y2 + 20*Math.sin(ang)));    bPart.addPoint((int)(line.x2 - 20*Math.cos(ang)), (int)(line.y2 - 20*Math.sin(ang)));    //draw brown railings on the bridges    foreG.setColor(new Color(139, 69, 19).darker()); //brown    foreG.setStroke(new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));    Point[] postBases1 = new Point[5];    Point[] postBases2 = new Point[5];    for(int i = 0; i < 3; i += 1) {      postBases1[i] = new Point((int)(aPart.xpoints[0] + i*(line.x2-line.x1)/2),                                (int)(aPart.ypoints[0] + i*(line.y2-line.y1)/2));      postBases2[i] = new Point((int)(aPart.xpoints[1] + i*(line.x2-line.x1)/2),                                (int)(aPart.ypoints[1] + i*(line.y2-line.y1)/2));      foreG.drawLine(postBases1[i].x, height-postBases1[i].y, postBases1[i].x, height-(postBases1[i].y + 15));      foreG.drawLine(postBases2[i].x, height-postBases2[i].y, postBases2[i].x, height-(postBases2[i].y + 15));    }    foreG.drawLine(postBases1[0].x, height-(postBases1[0].y+7), postBases1[1].x, height-(postBases1[1].y + 15));    foreG.drawLine(postBases1[2].x, height-(postBases1[2].y+7), postBases1[1].x, height-(postBases1[1].y + 15));    foreG.drawLine(postBases2[0].x, height-(postBases2[0].y+7), postBases2[1].x, height-(postBases2[1].y + 15));    foreG.drawLine(postBases2[2].x, height-(postBases2[2].y+7), postBases2[1].x, height-(postBases2[1].y + 15));    //add the polygons and connections    bridgePolygons.add(aPart);    bridgePolygons.add(bPart);    Vector aConns = new Vector(), bConns = new Vector();    aConns.add(a);    aConns.add(bPart);    bConns.add(b);    bConns.add(aPart);    bridgeConnections.add(aConns);    bridgeConnections.add(bConns);    ((Vector)connections.get(countryPolygons.indexOf(a))).add(aPart);    ((Vector)connections.get(countryPolygons.indexOf(b))).add(bPart);  }  //output the xml of all countryside hexagon continents  private void writeHexagons() {    //for each castle, write the hexagons it owns    //bonus = borders-1    boolean[] taken = new boolean[countryPolygons.size()];    for(int i = 0; i < taken.length; i += 1) taken[i] = false;    for(int c = 0; c < numCastles; c += 1) {      Point center = polygonCenter(castleCenters[c]);      out.write("<continent>\n" +	"  <continentname>" + countrysideNames[c] + "</continentname>\n" +         "  <labellocation>" + center.x + "," + (center.y-40) + "</labellocation>\n");      int numBorders = 0;      loop:      for(int i = 0; i < countryPolygons.size(); i += 1) { //write out each country        if(taken[i] || closestCastle((Polygon)countryPolygons.get(i)) != c) {          continue loop;        }        taken[i] = true;        out.write("  <country>\n" +		"    <id>" + i + "</id>\n" +		"    <name>" + makeHexagonName() + "</name>\n");        Vector integerConnections = new Vector();        boolean border = false;        for(int j = 0; j < ((Vector)connections.get(i)).size(); j += 1) {          if(allPolygons.contains(((Vector)connections.get(i)).get(j)) &&             (closestCastle((Polygon)((Vector)connections.get(i)).get(j)) != c ||              bridgePolygons.contains(((Vector)connections.get(i)).get(j))))             border = true;          int index = allPolygons.indexOf(((Vector)connections.get(i)).get(j));          if(index != -1) {            integerConnections.add(new Integer(index));          }        }        if(border) {          numBorders += 1;        }        writeConnections(integerConnections);        writePolygon((Polygon)countryPolygons.get(i));        out.write("  </country>\n");      }      out.write("<bonus>" + Math.round(Math.min(numBorders-1, 6)) + "</bonus>\n");      out.write("</continent>\n");    }  }  //write the xml for the castles  //bonus = 6  private void writeCastles() {    for(int c = 0; c < numCastles; c += 1) {      Point center = polygonCenter(castleCenters[c]);      out.write("<continent>\n" +	"  <continentname>" + castleNames[c] + "</continentname>\n" +	"  <bonus>" + 6 + "</bonus>\n" +        "  <labellocation>" + center.x + "," + (center.y+20) + "</labellocation>\n");      for(int i = 0; i < 4; i += 1) {        //put army location in a good spot        int centerx = (int)(polygonCenter(castleCenters[c]).x + (cIR + cOR)/2*Math.sqrt(2)*Math.cos(Math.PI/4 + Math.PI/2*i));        int centery = (int)(polygonCenter(castleCenters[c]).y + (cIR + cOR)/2*Math.sqrt(2)*Math.sin(Math.PI/4 + Math.PI/2*i));        out.write("  <country>\n" +		"    <id>" + (countryPolygons.size() + c*4 + i) + "</id>\n" +		"    <name>" + makeWallName(i) + "</name>\n" +		"    <armylocation>" + centerx + "," + centery + "</armylocation>\n");        Vector integerConnections = new Vector();        for(int j = 0; j < castleConnections[c][i].size(); j += 1) {          int index = allPolygons.indexOf(castleConnections[c][i].get(j));          if(index != -1) {            integerConnections.add(new Integer(index));          }        }        writeConnections(integerConnections);        writePolygon(castles[c][i]);        out.write("  </country>\n");      }      out.write("</continent>\n");    }  }  //write the xml for the bridges  private void writeBridges() {    for(int i = 0; i < bridgePolygons.size(); i += 2) { //write out each country      out.write("<continent>\n" +	"  <continentname>Bridge</continentname>\n" +	"  <bonus>" + -2 + "</bonus>\n");      for(int j = 0; j < 2; j += 1) { //two halves per bridge        out.write("  <country>\n" +		"    <id>" + (countryPolygons.size() + numCastles*4 + i+j) + "</id>\n" +		"    <name>Bridge</name>\n");        Vector integerConnections = new Vector();        for(int k = 0; k < ((Vector)bridgeConnections.get(i+j)).size(); k += 1) {          int index = allPolygons.indexOf(((Vector)bridgeConnections.get(i+j)).get(k));          if(index != -1) {            integerConnections.add(new Integer(index));          }        }        writeConnections(integerConnections);        writePolygon((Polygon)bridgePolygons.get(i+j));        out.write("  </country>\n");      }      out.write("</continent>\n");    }  }  //finish off the theme and write it to a folder  private void doTheme() {    //draw castle images inside castles    for(int i = 0; i < numCastles; i += 1) {      drawCastleAt(polygonCenter(castleCenters[i]));    }    //draw houses & churches dotting the countryside    drawCountrysideDecorations();    backG.setColor(Color.black);    backG.setStroke(new BasicStroke(1));    backG.drawLine(0, 0, 0, height-1);    backG.drawLine(1, 0, 1, height-1);    backG.drawLine(width-1, 0, width-1, height);    backG.drawLine(width-2, 0, width-2, height);    backG.drawLine(width-3, 0, width-3, height);    //now handle the file stuff    try {      //first delete any old theme directories      File support = new File(new File(m.getMapGeneratorPath()).getParent());      File[] supportChildren = support.listFiles();      File themes = null;      for(int i = 0; i < supportChildren.length; i += 1) {        if(supportChildren[i].getName().toLowerCase().equals("themes")) {          themes = supportChildren[i];        }      }      File[] themesChildren = themes.listFiles();      for(int i = 0; i < themesChildren.length; i += 1) {        if(themesChildren[i].getName().indexOf("CastleInfinity") != -1) {          File[] oldThemeFiles = themesChildren[i].listFiles();          for(int j = 0; j < oldThemeFiles.length; j += 1) {            oldThemeFiles[j].delete();          }          themesChildren[i].delete();        }      }      //then write one for this map      new File(themes.getPath() + File.separator + choice + seed).mkdir();      ImageIO.write(background, "png", new File(themes + File.separator + choice+seed + File.separator + "background.png"));      ImageIO.write(foreground, "png", new File(themes + File.separator + choice+seed + File.separator + "overground.png"));    } catch(Exception e) {      debug(e.toString());    }  }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一区| 欧美mv日韩mv国产网站| 久久国产精品99久久人人澡| 中文av一区特黄| 欧美乱妇20p| 北岛玲一区二区三区四区| 日本欧美久久久久免费播放网| 中文字幕免费观看一区| 91精品免费在线| 91网站最新地址| 国产精品一二三区| 七七婷婷婷婷精品国产| 亚洲一区在线看| 国产精品久久久久久久久免费桃花 | 精品黑人一区二区三区久久 | 狠狠色综合播放一区二区| 一区二区三区日韩欧美精品 | 婷婷综合另类小说色区| 亚洲欧美在线aaa| 久久久久久麻豆| 日韩欧美国产一区二区三区| 欧美三片在线视频观看| 一本久久a久久精品亚洲| 国产成a人亚洲精品| 韩国理伦片一区二区三区在线播放| 亚洲第一成人在线| 一区二区三区国产| 亚洲欧美韩国综合色| 日韩理论电影院| 亚洲欧美日韩在线播放| 中文字幕一区二区三区蜜月| 国产欧美中文在线| 国产亚洲欧美日韩日本| 久久综合久久综合久久| 日韩精品一区二区三区视频 | 国产精品99久| 久久精品国产**网站演员| 免费高清成人在线| 美女mm1313爽爽久久久蜜臀| 美日韩一级片在线观看| 免费人成黄页网站在线一区二区| 婷婷久久综合九色国产成人| 亚洲1区2区3区视频| 丝袜亚洲另类欧美| 日韩精品成人一区二区三区| 日韩黄色免费电影| 日本亚洲免费观看| 久久精品国产99| 国产成人啪免费观看软件| 国产盗摄精品一区二区三区在线| 国产成人在线免费观看| 成人h版在线观看| 91麻豆国产福利在线观看| 91麻豆国产自产在线观看| 欧美影院一区二区三区| 在线播放一区二区三区| 91精品国产91综合久久蜜臀| 日韩欧美一卡二卡| 久久久99精品免费观看不卡| 国产精品入口麻豆九色| 亚洲美女免费视频| 午夜视频在线观看一区| 青青草伊人久久| 国产盗摄一区二区| 91丨porny丨首页| 欧美日韩一本到| 日韩欧美激情在线| 国产欧美日韩精品a在线观看| 中文字幕一区在线观看| 亚洲福利视频三区| 久久电影网站中文字幕| 成人短视频下载| 欧美日韩国产免费一区二区 | 亚洲va韩国va欧美va| 激情综合网天天干| 99视频精品在线| 51精品国自产在线| 国产免费成人在线视频| 亚洲第一主播视频| 国产精品综合视频| 欧美色视频一区| 国产日产欧产精品推荐色| 亚洲图片自拍偷拍| 国产一区亚洲一区| 欧美日韩一区高清| 中文字幕av一区二区三区| 99re热视频精品| 欧美日韩一级片在线观看| 久久精品视频一区二区| 亚洲精品视频免费观看| 国产一区二区三区免费观看| 色婷婷久久综合| 久久人人爽爽爽人久久久| 亚洲国产综合人成综合网站| 国产精品99久久久久久宅男| 欧美日韩大陆在线| 亚洲欧洲日韩女同| 激情亚洲综合在线| 欧美三级电影在线观看| 国产精品的网站| 精品一区二区三区免费观看| 欧美日韩亚洲国产综合| 国产精品久久久久久久午夜片 | 成人一区在线看| 日韩精品在线网站| 亚洲成人综合视频| 91在线你懂得| 国产精品免费免费| 经典三级一区二区| 欧美一区二区视频在线观看2022| 综合网在线视频| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 色综合天天综合在线视频| 日韩亚洲欧美一区| 亚洲成人精品一区| 色琪琪一区二区三区亚洲区| 国产亚洲欧美色| 国产在线视频不卡二| 欧美一区二区福利在线| 五月天激情小说综合| 91福利在线播放| 依依成人综合视频| 91免费观看在线| 国产精品久久久久久久久久久免费看| 久久国产精品99久久久久久老狼| 欧美美女一区二区三区| 亚洲国产日日夜夜| 色狠狠桃花综合| 一区二区三区av电影 | 欧美伦理电影网| 天堂蜜桃91精品| 欧美日韩成人综合| 亚洲成人综合视频| 91精品国产全国免费观看| 日韩在线卡一卡二| 欧美一区二区国产| 激情图片小说一区| 亚洲精品一线二线三线| 国产一区二区三区黄视频| 久久先锋影音av鲁色资源网| 国产一区91精品张津瑜| 337p日本欧洲亚洲大胆色噜噜| 韩国v欧美v亚洲v日本v| 久久久噜噜噜久久人人看 | 亚洲国产一区二区三区| 欧美午夜精品理论片a级按摩| 亚洲综合精品久久| 在线成人av网站| 国产精品一二三四五| 中文字幕一区二区视频| 一本到三区不卡视频| 亚洲成av人片在www色猫咪| 欧美日韩国产bt| 久久99久久99| 国产精品沙发午睡系列990531| 99精品久久只有精品| 一区二区三区久久久| 欧美麻豆精品久久久久久| 精品一区二区综合| 国产精品视频免费看| 色8久久人人97超碰香蕉987| 五月天激情小说综合| 欧美mv日韩mv国产| 成人h动漫精品一区二| 亚洲一区二区三区在线| 日韩三级视频中文字幕| 国产成人免费网站| 亚洲一区二区在线观看视频 | 美女视频网站黄色亚洲| 国产欧美久久久精品影院| 色一情一伦一子一伦一区| 日本系列欧美系列| 国产精品无码永久免费888| 91成人免费在线| 国内一区二区视频| 一区二区三区欧美在线观看| 欧美一区二区精品在线| 国产69精品久久777的优势| 亚洲一区二区精品3399| 精品国产免费视频| 91国偷自产一区二区三区成为亚洲经典 | www.视频一区| 日韩激情一区二区| 国产精品国产三级国产三级人妇 | 中文字幕亚洲综合久久菠萝蜜| 欧美日韩情趣电影| 国产成人午夜精品5599| 三级不卡在线观看| 亚洲三级在线免费观看| 精品国产乱码久久久久久闺蜜| 色婷婷久久久久swag精品 | 99久久久无码国产精品| 蜜桃视频免费观看一区| 洋洋av久久久久久久一区| 国产三级精品在线| 555www色欧美视频| 91久久免费观看| 丁香婷婷深情五月亚洲| 麻豆91在线看| 亚洲午夜羞羞片|