Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var mask = new Mask(5, 5);
            mask[0, 0] = false;
            mask[2, 2] = false;
            mask[4, 4] = false;

            IGrid grid = new MaskedGrid(mask);
            new RecursiveBacktracker().Run(ref grid);

            Console.WriteLine(grid.ToString(false));
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            string file = (args.Length == 1)
                        ? file = args[0]
                        : Path.Combine(Environment.CurrentDirectory, "mask.txt");

            var mask = Mask.ReadFromTextFile(file);
            IGrid grid = new MaskedGrid(mask);
            new RecursiveBacktracker().Run(ref grid);

            Console.WriteLine(grid.ToString(false));
            Console.ReadKey();
        }