/// <summary> /// Generate the IceCaps /// </summary> /// <param name="sizex"></param> /// <param name="sizey"></param> /// <returns></returns> public PointGroup GenerateIceCaps(int sizex, int sizey) { int miny = sizey / 8; int maxy = sizey * 7 / 8; PointGroupGenerator pgg = new PointGroupGenerator(); PointGroup caps = new PointGroup(); caps.AddRange(pgg.GenerateBox(0, 0, sizex, miny, (sizex + sizey) * 2, MapTerrain.Ice)); caps.AddRange(pgg.GenerateBox(0, maxy, sizex, sizey, (sizex + sizey) * 2, MapTerrain.Ice)); foreach (MapPoint mp in caps) { mp.Terrain = IceOrOcean(mp.Y, sizey); } PointGroup newpointgroup = new PointGroup(); newpointgroup.AddRangeAlpha(caps, MapTerrain.Ocean); return(newpointgroup); }
/// <summary> /// Generate ocean /// </summary> /// <param name="sizex">Size of map</param> /// <param name="sizey">Size of map</param> /// <returns>Ocean PointGroup</returns> public PointGroup GenerateOcean(int sizex, int sizey) { PointGroupGenerator pgg = new PointGroupGenerator(); return(pgg.GenerateBox(0, 0, sizex, sizey, sizex + sizey / 2, MapTerrain.Ocean)); }