Esempio n. 1
0
        public static void SidesOcean(HexagonCollection collection, WorldGenParamters world)
        {
            List <int> rows = new List <int>()
            {
                0, 1, world.MaxRows - 2, world.MaxRows - 1
            };

            foreach (int row in rows)
            {
                for (int col = 0; col < world.MaxCol; col++)
                {
                    collection.Get(row, col).Elevation = -500;
                }
            }

            List <int> cols = new List <int>()
            {
                0, world.MaxCol - 1
            };

            foreach (int col in cols)
            {
                for (int row = 0; row < world.MaxRows; row++)
                {
                    var hex = collection.Get(row, col);
                    hex.Elevation           = -500;
                    hex.Terrain.TerrainEnum = TerrainEnum.Grassland;
                }
            }
        }
Esempio n. 2
0
        public string MouseOver(int x, int y)
        {
            int row, col;

            PointToHex(x, y, parameters.HexHeight, out row, out col);
            var hex = collection.Get(row, col);

            if (hex != null)
            {
                var coordinate          = String.Format("[{0},{1}]:", col, row).PadRight(10);
                var terrainEnum         = hex.Terrain.TerrainEnum.ToString().PadRight(15);
                var polar_temp_tropical = String.Format("{0},{1},{2}", TerrainAdjacentcy.Polarness(row, parameters.MaxRows), TerrainAdjacentcy.Temperateness(row, parameters.MaxRows), TerrainAdjacentcy.Tropicalness(row, parameters.MaxRows));

                return(string.Format("{0} {1} - {2} *** {3}", coordinate, terrainEnum, hex.Elevation, polar_temp_tropical));
            }
            else
            {
                return("---");
            }
        }
Esempio n. 3
0
 public static void CenterSeed(HexagonCollection collection, WorldGenParamters world)
 {
     collection.Get(world.MaxRows / 2, world.MaxCol / 2).Terrain = Terrain.EnumMap[TerrainEnum.Grassland];
 }