Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.White;
            Console.BackgroundColor = ConsoleColor.Black;

            Puzzle P = new ConsoleApplication1.Puzzle(5);

            P.Initialize(4);
            P.PrintGrid();
            Console.WriteLine("Properly initilized Grid");
            Console.WriteLine();
            P.Number();
            P.PrintClues();
            P.PrintGrid();
            Console.WriteLine("Properly Numbered Grid");

            Console.Write("is this grid Symetric Result: " + P.IsSymmetric().ToString());
            Console.WriteLine();
            P = new ConsoleApplication1.Puzzle(7);
            P.InitializeSymetric(15);


            Console.WriteLine();
            P.PrintGrid();

            Console.Write("is this grid Symetric Result: " + P.IsSymmetric().ToString());
            Console.WriteLine();

            P = new ConsoleApplication1.Puzzle(5);
            P.Initialize(0);
            Console.Write("is the no black grid Symetric Result: " + P.IsSymmetric().ToString());
            Console.WriteLine();
            P = new ConsoleApplication1.Puzzle(5);
            P.Initialize(25);
            Console.Write("is the all black grid Symetric Result: " + P.IsSymmetric().ToString());
            Console.WriteLine();
            Console.WriteLine("press enter to close...");
            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Puzzle P = new ConsoleApplication1.Puzzle(5);

            P.Initialize(4);
            P.PrintGrid();
            P.Number();
            P.PrintClues();
            P.PrintGrid();
            int i = 0;

            while (!P.IsSymmetric())
            {
                P = new ConsoleApplication1.Puzzle(5);
                P.Initialize(10);
                i++;
            }
            Console.WriteLine();
            P.PrintGrid();
            Console.Write(i);
            Console.Write(P.CheckWordDown(2, 0));
            Console.WriteLine("press enter to close...");
            Console.ReadLine();
        }