using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WaveFunctionCollapseCLI { internal class Program { static void Main(string[] args) { List avaibleTilesTypes = new List(); avaibleTilesTypes.Add(new TileType("Water")); //[0] avaibleTilesTypes.Add(new TileType("Sand")); //[1] avaibleTilesTypes.Add(new TileType("Grass")); //[2] avaibleTilesTypes.Add(new TileType("Little_Forest"));//[3] avaibleTilesTypes.Add(new TileType("Forest")); //[4] // Water can be next to Sand avaibleTilesTypes[0].SetCompatibility(new List { avaibleTilesTypes[1] }); // Sand that can be next to water or grass avaibleTilesTypes[1].SetCompatibility(new List { avaibleTilesTypes[0], avaibleTilesTypes[2] }); // Grass can be next to Sand or little Forest avaibleTilesTypes[2].SetCompatibility(new List { avaibleTilesTypes[1], avaibleTilesTypes[3] }); // Little Forest than can be next to Grass or Forest avaibleTilesTypes[3].SetCompatibility(new List { avaibleTilesTypes[2], avaibleTilesTypes[4] }); // Forest that can be next to Little Forest avaibleTilesTypes[4].SetCompatibility(new List { avaibleTilesTypes[3] }); TileMap map = new TileMap(new Size(30, 30), avaibleTilesTypes); //only for console List colors = new List(); colors.Add(ConsoleColor.Blue); //Water colors.Add(ConsoleColor.Yellow); //Sand colors.Add(ConsoleColor.Green); //Grass colors.Add(ConsoleColor.DarkGreen); //Little_Forest colors.Add(ConsoleColor.DarkGray); //Forest (Sorry I dont have tha many colors to work with) while (true) { Console.Clear(); Console.WriteLine("********** Welcome to WaveFunctionCollapse **********"); Console.WriteLine("Press any key to to to the next step"); map.NextStep(); map.Display(avaibleTilesTypes,colors); Console.ReadKey(); } } } }