public static int[,] CreateCAMap(int mapSize, MapInfo mapInfo) { PseudoRandom rnd = mapInfo.GetSeededPsuedoRnd (); CellularAutomata ca = new CellularAutomata(); int[,] start = ca.InitialiseMap (0.4f, mapSize, rnd); int[,] map = ca.CreateCellularAutomataFromMap (start, rnd); map = MapEdges.CreateSurrounding (map, mapInfo); return map; }
void CreateCAMap() { PseudoRandom rnd = new PseudoRandom(seedX, seedY, seedZ); CellularAutomata ca = new CellularAutomata(); int[,] start = ca.InitialiseMap (0.4f, mapSize, rnd); map = ca.CreateCellularAutomataFromMap (start, rnd); map = MapEdges.CreateSurrounding (map, seedX, seedY, seedZ); CreateMap (map); toggle = true; }