// Multiplication    (2)
        public static void Multiplication()
        {
            int nr1;
            int nr2;
            int answer;

            Console.Clear();
            Console.ForegroundColor = ConsoleColor.White;

            Random random = new Random();

            nr1 = random.Next(1, 11);
            nr2 = random.Next(1, 11);

            Console.WriteLine("{0} x {1} = ? ", nr1, nr2);
            Console.Read();

            answer = Convert.ToInt32(Console.ReadLine());

            if (answer == nr1 * nr2)
            {
                Console.Clear();
                Console.WriteLine();
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Write("Correct! ");

                Minigame.Win();
            }

            else
            {
                Minigame.Lose();
            }
        }
Exemple #2
0
        public static void TheWheel()
        {
            Console.Clear();

            //setting int "game" as different things depending on int number
            //game =


            Console.ForegroundColor = ConsoleColor.DarkGreen;

            System.Threading.Thread.Sleep(slowDownI = 0);

            //wheel spin ( to choose a game)
            for (int i = 0; i <= 69; i++)
            {
                Random random = new Random();

                if (i <= 50)
                {
                    //Slows the text down
                    System.Threading.Thread.Sleep(slowDownI++);

                    gameNr = random.Next(1, 16);

                    Console.WriteLine(game);

                    Console.Clear();
                }

                else if (i >= 50 && i <= 60)
                {
                    System.Threading.Thread.Sleep(slowDownI += 5);

                    gameNr = random.Next(1, 16);
                    Console.WriteLine(game);

                    Console.Clear();
                }

                else if (i > 60 && i <= 65)
                {
                    System.Threading.Thread.Sleep(slowDownI += 10);

                    gameNr = random.Next(1, 16);
                    Console.WriteLine(game);

                    Console.Clear();
                }

                else if (i > 65 && i <= 67)
                {
                    System.Threading.Thread.Sleep(slowDownI += 50);

                    gameNr = random.Next(1, 16);
                    Console.WriteLine(game);

                    Console.Clear();
                }

                else if (i > 67 && i < 69)
                {
                    System.Threading.Thread.Sleep(slowDownI += 99);

                    gameNr = random.Next(1, 16);
                    Console.WriteLine(game);

                    Console.Clear();
                }

                else if (i == 69)
                {
                    System.Threading.Thread.Sleep(slowDownI += 300);

                    gameNr = random.Next(1, 7);
                    Console.WriteLine(game);

                    Console.Clear();
                }

                // / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / //

                Console.WriteLine();


                //All different games.

                // Guess the number.
                if (gameNr == 1)
                {
                    game = "Guess the number";
                    Console.Write(game);
                    //Minigame;
                }

                // Multiplication.
                if (gameNr == 2)
                {
                    game = "Multiplication";
                    Console.Write(game);
                }

                // Fight.
                if (gameNr == 3)
                {
                    game = "Fight";
                    Console.Write(game);
                }

                //
                if (gameNr == 4)
                {
                    game = "Adventure";
                    Console.Write(game);
                }

                //
                if (gameNr == 5)
                {
                    game = "The wheel";
                    Console.Write(game);
                }

                //
                if (gameNr == 6)
                {
                    game = "Yahtzee";
                    Console.Write(game);
                }

                //
                if (gameNr == 7)
                {
                    game = "OPEOP";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 8)
                {
                    game = "HGAHGA";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 9)
                {
                    game = "BANABNBBDANA";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 10)
                {
                    game = "OAREA";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 11)
                {
                    game = "OREO";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 12)
                {
                    game = "!";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 13)
                {
                    game = "D0OEI";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 14)
                {
                    game = "ASASASASSSASSASSA";
                    Console.WriteLine(game);
                }

                //
                if (gameNr == 15)
                {
                    game = "FLIPPERPLIPPER";
                    Console.WriteLine(game);
                }
            }

            System.Threading.Thread.Sleep(700);

            //game was chosen
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine();
            Console.Write(game);

            //For loop makes it blink! yay!
            for (int i = 0; i <= 3; i++)
            {
                System.Threading.Thread.Sleep(150);

                Console.Clear();
                Console.WriteLine();
                Console.Write("");

                System.Threading.Thread.Sleep(150);

                Console.Clear();
                Console.WriteLine();
                Console.Write(game);
            }

            Console.Clear();
            Console.WriteLine();
            Console.Write(game);

            System.Threading.Thread.Sleep(1500);

            //MINIGAME PATHS

            // Guess the number.
            if (gameNr == 1)
            {
                Minigame.GuessNumber();
            }

            // Multiplication.
            else if (gameNr == 2)
            {
                Minigame.Multiplication();
            }

            // Fight.
            else if (gameNr == 3)
            {
                Minigame.FightGame();
            }

            // Multiplication.
            else if (gameNr == 4)
            {
                Minigame.Adventure();
            }

            // Multiplication.
            else if (gameNr == 5)
            {
                Minigame.wheelGame();
            }

            // Multiplication.
            else if (gameNr == 6)
            {
                Minigame.Yahtzee();
            }

            // Multiplication.
            else if (gameNr == 7)
            {
            }

            // Multiplication.
            else if (gameNr == 8)
            {
            }

            // Multiplication.
            else if (gameNr == 9)
            {
            }

            // Multiplication.
            else if (gameNr == 10)
            {
            }

            // Multiplication.
            else if (gameNr == 11)
            {
            }

            // Multiplication.
            else if (gameNr == 12)
            {
            }

            // Multiplication.
            else if (gameNr == 13)
            {
            }

            // Multiplication.
            else if (gameNr == 14)
            {
            }

            // Multiplication.
            else if (gameNr == 15)
            {
            }
        }
        // Guess The Number  (1)
        public static void GuessNumber()
        {
            int numberU  = 1;
            int tryCount = 0;

            Random random  = new Random();
            int    numberC = random.Next(1, 11);

            while (numberC != numberU)
            {
                Console.Clear();
                Console.WriteLine();
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write("Enter a number from ");
                Console.ForegroundColor = ConsoleColor.Green;

                Console.Write("1 ");
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write("to ");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Write("10 ");

                Console.WriteLine();
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Write("> ");
                Console.ForegroundColor = ConsoleColor.White;

                numberU = Convert.ToInt32(Console.ReadLine());

                if (numberU < numberC)
                {
                    Console.WriteLine();
                    Console.WriteLine("Too Low!");
                    Console.WriteLine("Try Again!");
                    System.Threading.Thread.Sleep(1000);
                }

                else if (numberU > numberC)
                {
                    Console.WriteLine();
                    Console.WriteLine("Too High!");
                    Console.WriteLine("Try Again!");
                    System.Threading.Thread.Sleep(1000);
                }

                else
                {
                    Console.Clear();
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine();
                    Console.WriteLine(numberC + "!");
                    System.Threading.Thread.Sleep(1000);
                    Console.WriteLine();
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.Write("It took you ");
                    Console.ForegroundColor = ConsoleColor.Green;
                    tryCount++;
                    Console.Write(tryCount);
                    Console.ForegroundColor = ConsoleColor.White;

                    if (tryCount == 1)
                    {
                        Console.Write(" Try! Good guess!");
                        System.Threading.Thread.Sleep(1000);
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.Write(" +1");
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.Write("p Extra! ");
                        System.Threading.Thread.Sleep(500);
                    }

                    else
                    {
                        Console.Write(" Tries.");
                    }

                    System.Threading.Thread.Sleep(1000);
                    Minigame.Win();
                }
                tryCount++;
            }
        }