public void MainMenu(int i)
        {
            Console.WriteLine("Select an option...");
            Console.WriteLine("0 - Generic Test File");
            Console.WriteLine("1 - Prime numbers generator and binary search");
            Console.WriteLine("2 - Eight Queen Problem");
            Console.WriteLine("3 - Buy Sell Gold");
            Console.WriteLine("4 - ParallelMatrixComputation");
            ConsoleKeyInfo key = Console.ReadKey();

            Console.WriteLine(i);

            switch (key.KeyChar)
            {
            case '0':
                SecondaryMenu.Meh();
                break;

            case '1':
                BinarySieve.ExecuteBinaryAndSieve();
                break;

            case '2':
                EightQueenProblem.Backtracking();
                break;

            case '3':
                BuySellGold.Initialize();
                break;

            case '4':
                ParallelMatrixMultiplication.ExecuteMultiplyMatrices();
                break;
            }
        }
Exemplo n.º 2
0
        public static void Backtracking()
        {
            //TODO: Add input for number of rows and collumns

            EightQueenProblem eightQueenProblem = new EightQueenProblem(8);

            eightQueenProblem.Initialize();
            eightQueenProblem.DisplaySolution();
            Console.ReadLine();

            IMenuController alg = new Algorythms() as IMenuController;

            alg.MainMenu();
        }