Пример #1
0
        public static void Nextplanet()
        {
            Console.WriteLine("Good job " + playername + " on your urianiam trade");
            Console.WriteLine("You have " + main + " left");
            Console.WriteLine("You should go to another planet now witch planet would you like to go to now");
            Console.WriteLine("                            Press Enter To Continue                 ");
            do
            {
                Console.WriteLine("choice A | planet : BOT");
                Console.WriteLine("choice B | planet : TOPA");
                Console.WriteLine("Choice C | planet : KEWA");
                Console.WriteLine("Choice D | planet : DAD");
                Console.WriteLine("Choice E | planet : MOM");
                Console.WriteLine("Choice F | planet : HAM");
                Console.WriteLine("Choice G | planet : BAT");
                Console.WriteLine("Choice H | planet : GOD");
                Console.WriteLine("Enter one from the list above");
                Console.WriteLine("                            Press Enter To Continue                 ");


                bool myanswer = false;
                do
                {
                    string myplanet = Console.ReadLine();
                    if (myplanet.ToLower() == "a")
                    {
                        Planet planet = new Planet();
                        planet.Name = "BOT";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "b")
                    {
                        Planet planet = new Planet();
                        planet.Name = "TOPA";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "c")
                    {
                        Planet planet = new Planet();
                        planet.Name = "KEWA";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "d")
                    {
                        Planet planet = new Planet();
                        planet.Name = "DAD";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "e")
                    {
                        Planet planet = new Planet();
                        planet.Name = "MOM";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "f")
                    {
                        Planet planet = new Planet();
                        planet.Name = "HAM";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "g")
                    {
                        Planet planet = new Planet();
                        planet.Name = "BAT";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else if (myplanet.ToLower() == "h")
                    {
                        Planet planet = new Planet();
                        planet.Name = "GOD";
                        Console.WriteLine("You choose planet " + planet.Name);
                        myanswer = true;
                    }
                    else
                    {
                        Console.WriteLine("Choose Again");
                    }
                } while (myanswer == false);
                Console.ReadLine();
                Console.WriteLine("                            Press Enter To Continue                 ");
                Console.Clear();

                Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
                Console.WriteLine("");
                Console.WriteLine("the current time now is");

                DateTime thetime = DateTime.Now;
                Console.WriteLine(thetime.ToString());

                Console.WriteLine("Goodluck on your trip");
                Console.WriteLine("                            Press Enter To Continue                 ");
                Console.ReadLine();
                Console.WriteLine("                            Press Enter To Continue                 ");
                Console.Clear();

                Console.Title = "ASCII Art";
                string pic = @"

                      ──────────────▄▀█▀█▀▄
─────────────▀▀▀▀▀▀▀▀▀ 
─────────────▄─░░░░░▄
───█──▄─▄───▐▌▌░░░░░▌▌
▌▄█▐▌▐█▐▐▌█▌█▌█░░░░░▌▌

                              
                                         Press Enter To Continue                   ";

                Console.WriteLine(pic);
                Console.Read();
                Console.ReadLine();
                Console.Clear();

                Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
                Console.WriteLine("");
                DateTime timenow = DateTime.Now;
                Console.WriteLine(timenow.AddYears(3));
                Console.WriteLine("                            Press Enter To Continue                 ");
                Console.ReadLine();
                Console.Clear();
                Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
                Console.WriteLine("");
                Console.WriteLine("looks like you are going to need some fuel now");
                Console.WriteLine("how much would you like");
                Console.WriteLine("1/2 full 2000$ select : A | full 4000$ select : B");
                Console.WriteLine("                                                            Press Enter To Continue                 ");

                string choose = Console.ReadLine();
                switch (choose)

                {
                case "a":
                    main = main - fuel1;
                    Console.WriteLine("you picked 1/2 full");
                    Console.WriteLine("you have " + main + " left");
                    break;

                case "b":
                    main = main - fuel2;
                    Console.WriteLine("you picked 1/2 full");
                    Console.WriteLine("you have " + main + " left");
                    break;

                default:
                    Console.WriteLine("Choose Again");
                    break;
                }
                Console.WriteLine("                            Press Enter To Continue                 ");

                Console.ReadLine();
                Console.Clear();
                if (main > 0)
                {
                    break;
                }
            } while (false);
        }
Пример #2
0
        public void TravelMenu()
        {
            Console.Clear();
            Console.WriteLine("Which Planet do you want to go to? ");
            Console.WriteLine("----------------------------------------");
            Console.WriteLine("Press F1 to go back to MAIN MENU");
            DisplayPlanets();

            Console.WriteLine();
            planetChoice = Console.ReadKey();
            Console.WriteLine();

            if (planetChoice.Key != ConsoleKey.F1)
            {
                PlanetChoice(planetChoice);


                Console.WriteLine("Press <Enter> to confirm or <Escape> to cancel:");
                confirmation = Console.ReadKey();
                Console.WriteLine();
                if (confirmation.Key == ConsoleKey.Enter)
                {
                    Console.WriteLine("What warp factor would you like to use? :");
                    try
                    {
                        warpFactor = int.Parse(Console.ReadLine());
                        ship.Speed(warpFactor);
                    }
                    catch (System.FormatException)
                    {
                        Console.WriteLine("Invalid Input");
                        TravelMenu();
                    }
                    MovePlanet();
                    Console.WriteLine();
                    Console.WriteLine($"At the speed of {ship.velocity.ToString("F2")} , it will take you " +
                                      $"{travelTime.ToString("F2")} Light Years " +
                                      $" to reach your destination and it will cost you {fuelCost.ToString("F2")} in fuel");

                    if (fuelCost > Character.currentfuelLevel)
                    {
                        Console.WriteLine();
                        Console.WriteLine("You do not have enough fuel to travel that far that fast.");
                        Console.WriteLine("\nTry to go to a different planet, or buy more fuel");
                        TravelMenu();
                    }
                    else
                    {
                        Console.WriteLine();
                        Console.WriteLine("Do you want to proceed? Y/N");
                        var confirm = Console.ReadKey();
                        Console.WriteLine();
                        Console.WriteLine();

                        if (confirm.Key == ConsoleKey.N)
                        {
                            TravelMenu();
                        }
                        else
                        {
                            RandomEvent();
                            currentPlanet = goPlanet;
                        }
                    }
                }
                else
                {
                    TravelMenu();
                }
            }
            else
            {
                Console.Clear();
            }
        }
Пример #3
0
        public static void Planet()
        {
            Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
            Console.WriteLine("");

            Console.WriteLine("Now " + playername + " has chosen cargo an a space ship and are ready to travel |--|");
            Console.WriteLine("What planet would you like to go to");
            Console.WriteLine("choice A | planet : BOT");
            Console.WriteLine("choice B | planet : TOPA");
            Console.WriteLine("Choice C | planet : KEWA");
            Console.WriteLine("Choice D | planet : DAD");
            Console.WriteLine("Choice E | planet : MOM");
            Console.WriteLine("Choice F | planet : HAM");
            Console.WriteLine("Choice G | planet : BAT");
            Console.WriteLine("Choice H | planet : GOD");
            Console.WriteLine("Enter one from the list above");
            Console.WriteLine("                            Press Enter To Continue                 ");



            bool myanswer = false;

            do
            {
                string myplanet = Console.ReadLine();
                if (myplanet.ToLower() == "a")
                {
                    Planet planet = new Planet();
                    planet.Name = "BOT";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "b")
                {
                    Planet planet = new Planet();
                    planet.Name = "TOPA";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "c")
                {
                    Planet planet = new Planet();
                    planet.Name = "KEWA";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "d")
                {
                    Planet planet = new Planet();
                    planet.Name = "DAD";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "e")
                {
                    Planet planet = new Planet();
                    planet.Name = "MOM";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "f")
                {
                    Planet planet = new Planet();
                    planet.Name = "HAM";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "g")
                {
                    Planet planet = new Planet();
                    planet.Name = "BAT";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else if (myplanet.ToLower() == "h")
                {
                    Planet planet = new Planet();
                    planet.Name = "GOD";
                    Console.WriteLine("You choose planet " + planet.Name);
                    myanswer = true;
                }
                else
                {
                    Console.WriteLine("Choose Again");
                }
            } while (myanswer == false);
            Console.WriteLine("                            Press Enter To Continue                 ");

            Console.ReadLine();
            Console.Clear();

            Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
            Console.WriteLine("");
            Console.WriteLine("Good luck " + playername + " on your advernture the time right below is the time it is now ");

            DateTime thetime = DateTime.Now;

            Console.WriteLine(thetime.ToString());
            Console.WriteLine("                            Press Enter To Continue                 ");
            Console.ReadLine();

            Console.Clear();

            Console.Title = "ASCII Art";
            string pic = @"

                    ──────────────▄▀█▀█▀▄
─────────────▀▀▀▀▀▀▀▀▀ 
─────────────▄─░░░░░▄
───█──▄─▄───▐▌▌░░░░░▌▌
▌▄█▐▌▐█▐▐▌█▌█▌█░░░░░▌▌

                              
                                 Press Enter To Continue                           ";

            Console.WriteLine(pic);
            Console.Read();
            Console.ReadLine();
            Console.Clear();

            Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
            Console.WriteLine("");
            Console.WriteLine("you have a arived at your destination");
            DateTime timenow = DateTime.Now;

            Console.WriteLine(timenow.AddYears(3));
            Console.WriteLine("                            Press Enter To Continue                 ");
            Console.ReadLine();
            Console.Clear();


            Console.WriteLine("-------------------------money-> " + main + " <-money---------------------------------");
            Console.WriteLine("");
            Console.WriteLine("How much urianium would you like to trade for money");
            Console.Write("Enter your number and press enter to continue:");
            string choice = "";

            choice = Console.ReadLine();
            main   = main + Convert.ToInt32(choice);



            Console.WriteLine("you have traded " + choice);
            Console.WriteLine("you have " + main + " now");
            Console.ReadLine();
            Console.WriteLine("                            Press Enter To Continue                 ");
            Console.Clear();
        }
Пример #4
0
 public Travel()
 {
     galaxy        = new Universe();
     ship          = new Ship();
     currentPlanet = galaxy.earth;
 }