Esempio n. 1
0
            public static Labyrinth Generate(Int32 seed = 0)
            {
                if (seed <= 0)
                {
                    seed = (new Random()).Next(0, Int32.MaxValue);
                }

                int Height = 5 + (int)(seed % 10);
                int Width  = 15 + (int)(seed % 9);

                Labyrinth Resutlt = new Labyrinth(Width);

                for (int i = 0; i < Height; i++)
                {
                    Resutlt.AddRow(seed);
                }

                Resutlt.CreateLastRow();

                return(Resutlt);
            }