Esempio n. 1
0
 private static void HowToPlay()
 {
     Hints.DrawHintsOnConsole();
     Console.ForegroundColor = ConsoleColor.Red;
     Console.Write(string.Concat(new object[]
     {
         " ",
         '↑',
         "\n ",
         '↓'
     }));
     Console.ForegroundColor = ConsoleColor.White;
     Console.WriteLine("  You move with the arrows.\n");
     Console.ForegroundColor = ConsoleColor.Red;
     Console.Write(" []\n []");
     Console.ForegroundColor = ConsoleColor.White;
     Console.Write("  Do not touch it.\n");
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine(" []\n");
     Console.ForegroundColor = ConsoleColor.White;
     Console.Write(" <'");
     Console.ForegroundColor = ConsoleColor.Red;
     Console.Write('@');
     Console.ForegroundColor = ConsoleColor.White;
     Console.WriteLine("'> Colect this, it is a bouns.\n");
     Console.Write(" You fire missiles <'");
     Console.ForegroundColor = ConsoleColor.Magenta;
     Console.Write('o');
     Console.ForegroundColor = ConsoleColor.White;
     Console.WriteLine("'> with Space bar.\n");
     Console.Write(" You can open the door at the end of the map with <'");
     Console.ForegroundColor = ConsoleColor.Red;
     Console.Write('E');
     Console.ForegroundColor = ConsoleColor.White;
     Console.WriteLine("'>,\n if you got the same number of bonuses like the number of the current level.\n");
     Console.ForegroundColor = ConsoleColor.Yellow;
     Console.Write("       ,,, \n     __//*)");
     Console.ForegroundColor = ConsoleColor.White;
     Console.Write("   This is you");
     Console.ForegroundColor = ConsoleColor.Yellow;
     Console.WriteLine("\n   ~(__)   \n   //  \\\\  ");
     Console.ForegroundColor = ConsoleColor.White;
     Console.ForegroundColor = ConsoleColor.Gray;
     Console.Write("   ,,\n   <>~");
     Console.ForegroundColor = ConsoleColor.White;
     Console.Write("   Kill those sons of a bitch(mice) with missiles.");
     Console.ForegroundColor = ConsoleColor.Gray;
     Console.WriteLine("\n   ''");
     Console.ForegroundColor = ConsoleColor.White;
     Hints.DrawPointsOnConsole();
     Console.WriteLine(" Collect bonus give you a HUNDRED points.");
     Console.WriteLine(" Killing mouse give you TEN points.");
     Console.WriteLine(" Every element from the area that move behind you, give you ONE point.");
 }
Esempio n. 2
0
        public static void Show()
        {
            Console.Clear();
            Console.CursorVisible        = false;
            Console.TreatControlCAsInput = true;

            string[] title =
            {
                "@@@@        @@@@@  @@@@@@@@@@@@  @@@@@      @@@@  @@@@    @@@@",
                "@@@@        @@@@@  @@@@@@@@@@@   @@@@@@     @@@@  @@@@    @@@@",
                "@@@@@       @@@@@  @@@@          @@@@ @@    @@@@  @@@@    @@@@",
                "@@@@@@     @@@@@@  @@@@@@@@      @@@@  @@   @@@@  @@@@    @@@@",
                "@@@@ @@   @@@@@@@  @@@@@@@@      @@@@   @@  @@@@  @@@@    @@@@",
                "@@@@  @@ @@ @@@@@  @@@@          @@@@    @@ @@@@  @@@@    @@@@",
                "@@@@   @@@  @@@@@  @@@@@@@@@@@   @@@@     @@@@@@   @@@    @@@",
                "@@@@    @   @@@@@  @@@@@@@@@@@@  @@@@      @@@@@    @@@@@@@@",
                "                                                              ",
                "                                                              ",
                "    ,,,        ,,,       ,,,        ,,,      ,,,        ,,,    ",
                "  __//*)     __//*)    __//*)     __//*)   __//*)     __//*)   ",
                "~(__)      ~(__)     ~(__)      ~(__)    ~(__)      ~(__)       ",
                "//  \\\\      \\\\//     //  \\\\      \\\\//    //  \\\\      \\\\//     "
            };

            Console.WriteLine("\n");
            Console.ForegroundColor = ConsoleColor.Cyan;

            for (int i = 0; i < title.Length - 4; i++)
            {
                Console.SetCursorPosition(26, Console.CursorTop);
                Console.WriteLine(title[i]);
            }

            Console.ForegroundColor = ConsoleColor.Red;
            for (int i = title.Length - 4; i < title.Length; i++)
            {
                Console.SetCursorPosition(26, Console.CursorTop);
                Console.WriteLine(title[i]);
            }

            string[] menu = new string[]
            {
                "            PLAY\n\n\n\n",
                "            HOW TO PLAY\n\n\n\n",
                "            HIGH SCORES\n\n\n\n",
                "            EXIT\n\n\n\n"
            };

            Console.ForegroundColor = ConsoleColor.White;
            Console.SetCursorPosition(44, Console.CursorTop + 4);
            Console.Write(menu[0]);
            for (int i = 1; i < 4; i++)
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.SetCursorPosition(44, Console.CursorTop);
                Console.Write(menu[i]);
            }

            PrintHorseInFront(42, 18);
            int row = 1;

            while (true)
            {
                ConsoleKeyInfo keyInfo = Console.ReadKey();
                if (keyInfo.Key == ConsoleKey.DownArrow && row == 1)
                {
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, 20);
                    Console.Write(menu[0]);
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[1]);

                    PrintHorseInFront(42, 22);
                    DeleteHorse(42, 18);
                    row++;
                }
                else if (keyInfo.Key == ConsoleKey.UpArrow && row == 2)
                {
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.SetCursorPosition(44, 20);
                    Console.Write(menu[0]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[1]);

                    DeleteHorse(42, 22);
                    PrintHorseInFront(42, 18);
                    row--;
                }
                else if (keyInfo.Key == ConsoleKey.DownArrow && row == 2)
                {
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, 20);
                    Console.Write(menu[0]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[1]);
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[2]);
                    PrintHorseInFront(42, 26);
                    DeleteHorse(42, 22);
                    row++;
                }
                else if (keyInfo.Key == ConsoleKey.DownArrow && row == 3)
                {
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, 20);
                    Console.Write(menu[0]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[1]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[2]);
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[3]);
                    PrintHorseInFront(42, 30);
                    DeleteHorse(42, 26);
                    row++;
                }
                else if (keyInfo.Key == ConsoleKey.UpArrow && row == 3)
                {
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, 20);
                    Console.Write(menu[0]);
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[1]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[2]);
                    DeleteHorse(42, 26);
                    PrintHorseInFront(42, 22);
                    row--;
                }
                else if (keyInfo.Key == ConsoleKey.UpArrow && row == 4)
                {
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, 20);
                    Console.Write(menu[0]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[1]);
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[2]);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.SetCursorPosition(44, Console.CursorTop);
                    Console.Write(menu[3]);
                    DeleteHorse(42, 30);
                    PrintHorseInFront(42, 26);
                    row--;
                }
                else if (keyInfo.Key == ConsoleKey.Enter && row == 1)
                {
                    Start.EffectsWithPrinting();
                    Game.Play();
                    return;
                }
                else if (keyInfo.Key == ConsoleKey.Enter && row == 2)
                {
                    Start.EffectsWithPrinting();
                    Hints.Hint();
                    ExitSelection();
                    return;
                }
                else if (keyInfo.Key == ConsoleKey.Enter && row == 3)
                {
                    Start.EffectsWithPrinting();
                    HighScores myScore = new HighScores();
                    myScore.ShowHighScore();
                    ExitSelection();
                    return;
                }
                else if (keyInfo.Key == ConsoleKey.Enter && row == 4)
                {
                    Environment.Exit(0);
                }
            }
        }
Esempio n. 3
0
 public static void Hint()
 {
     Console.ForegroundColor = ConsoleColor.White;
     Hints.HowToPlay();
 }
Esempio n. 4
0
        public static void Show()
        {
            Console.Clear();
            Console.CursorVisible        = false;
            Console.TreatControlCAsInput = true;

            string[] title =
            {
                "@@@@        @@@@@  @@@@@@@@@@@@  @@@@@      @@@@  @@@@    @@@@",
                "@@@@        @@@@@  @@@@@@@@@@@   @@@@@@     @@@@  @@@@    @@@@",
                "@@@@@       @@@@@  @@@@          @@@@ @@    @@@@  @@@@    @@@@",
                "@@@@@@     @@@@@@  @@@@@@@@      @@@@  @@   @@@@  @@@@    @@@@",
                "@@@@ @@   @@@@@@@  @@@@@@@@      @@@@   @@  @@@@  @@@@    @@@@",
                "@@@@  @@ @@ @@@@@  @@@@          @@@@    @@ @@@@  @@@@    @@@@",
                "@@@@   @@@  @@@@@  @@@@@@@@@@@   @@@@     @@@@@@   @@@    @@@",
                "@@@@    @   @@@@@  @@@@@@@@@@@@  @@@@      @@@@@    @@@@@@@@",
                "                                                              ",
                "                                                              ",
                "    ,,,        ,,,       ,,,        ,,,      ,,,        ,,,    ",
                "  __//*)     __//*)    __//*)     __//*)   __//*)     __//*)   ",
                "~(__)      ~(__)     ~(__)      ~(__)    ~(__)      ~(__)       ",
                "//  \\\\      \\\\//     //  \\\\      \\\\//    //  \\\\      \\\\//     "
            };
            Console.WriteLine("\n");
            Console.ForegroundColor = ConsoleColor.Cyan;
            for (int i = 0; i < title.Length - 4; i++)
            {
                Console.SetCursorPosition(26, Console.CursorTop);
                Console.WriteLine(title[i]);
            }

            Console.ForegroundColor = ConsoleColor.Red;
            for (int i = title.Length - 4; i < title.Length; i++)
            {
                Console.SetCursorPosition(26, Console.CursorTop);
                Console.WriteLine(title[i]);
            }

            List <string> menu = new List <string>(4);

            menu.Add("            PLAY\n\n\n\n");
            menu.Add("            HOW TO PLAY\n\n\n\n");
            menu.Add("            HIGH SCORES\n\n\n\n");
            menu.Add("            EXIT\n\n\n\n");

            Console.ForegroundColor = ConsoleColor.White;
            Console.SetCursorPosition(44, Console.CursorTop + 5);
            Console.Write(menu[0]);
            for (int i = 1; i < 4; i++)
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.SetCursorPosition(44, Console.CursorTop + 3);
                Console.Write(menu[i]);
            }
            PrintHorseInFront(42, 20);
            int row = 0;

            while (true)
            {
                if (Console.KeyAvailable)
                {
                    ConsoleKey key = Console.ReadKey().Key;
                    switch (key)
                    {
                    case ConsoleKey.UpArrow:
                    {
                        if (row != 0)
                        {
                            if (row == 1)
                            {
                                Console.ForegroundColor = ConsoleColor.White;
                                Console.SetCursorPosition(44, 21);
                                Console.Write(menu[0]);
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[1]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[2]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[3]);
                                DeleteHorse(42, 27);
                                PrintHorseInFront(42, 20);
                            }
                            else if (row == 2)
                            {
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, 21);
                                Console.Write(menu[0]);
                                Console.ForegroundColor = ConsoleColor.White;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[1]);
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[2]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[3]);
                                DeleteHorse(42, 34);
                                PrintHorseInFront(42, 27);
                            }
                            else
                            {
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, 21);
                                Console.Write(menu[0]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[1]);
                                Console.ForegroundColor = ConsoleColor.White;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[2]);
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[3]);
                                DeleteHorse(42, 41);
                                PrintHorseInFront(42, 34);
                            }
                            row--;
                        }
                    }
                    break;

                    case ConsoleKey.DownArrow:
                    {
                        if (row != 3)
                        {
                            if (row == 0)
                            {
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, 21);
                                Console.Write(menu[0]);
                                Console.ForegroundColor = ConsoleColor.White;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[1]);
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[2]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[3]);
                                DeleteHorse(42, 20);
                                PrintHorseInFront(42, 27);
                            }
                            else if (row == 1)
                            {
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, 21);
                                Console.Write(menu[0]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[1]);
                                Console.ForegroundColor = ConsoleColor.White;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[2]);
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[3]);
                                DeleteHorse(42, 27);
                                PrintHorseInFront(42, 34);
                            }
                            else
                            {
                                Console.ForegroundColor = ConsoleColor.Green;
                                Console.SetCursorPosition(44, 21);
                                Console.Write(menu[0]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[1]);
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[2]);
                                Console.ForegroundColor = ConsoleColor.White;
                                Console.SetCursorPosition(44, Console.CursorTop + 3);
                                Console.Write(menu[3]);
                                DeleteHorse(42, 34);
                                PrintHorseInFront(42, 41);
                            }
                            row++;
                        }
                    }
                    break;

                    case ConsoleKey.Enter:
                    {
                        if (row == 0)         // Play
                        {
                            Start.EffectsWithPrinting();
                            Game.Play();
                            return;
                        }
                        else if (row == 1)         // How to Play
                        {
                            Start.EffectsWithPrinting();
                            Hints.hint();
                            ExitSelection();
                            return;
                        }
                        else if (row == 2)         //High Scores
                        {
                            Start.EffectsWithPrinting();
                            HighScores myScore = new HighScores();
                            myScore.ShowHighScore();
                            ExitSelection();
                            return;
                        }
                        else
                        {
                            Environment.Exit(0);
                        }
                    }
                    break;

                    default:
                    {
                        Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop);
                        Console.Write(" ");
                        Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop);
                    }
                    break;
                    }
                }
            }
        }