Ejemplo n.º 1
0
        public static void BarnardCutscene()
        {
            Menu.ClearMenuArea();
            string barnardNear = $"\n\n                  You are now approaching {Planet.GetPlanetName(3)}";

            Cutscenes.PrintAnimation(barnardNear);
            Thread.Sleep(1000);
            string path = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\images/Barnard.bmp");

            Menu.ClearMenuArea();
            Console.SetCursorPosition(1, 1);
            Bitmap bmpSrc = new Bitmap(path, true);

            ConsoleWriteImage(bmpSrc);
            Thread.Sleep(1000);
            Console.SetCursorPosition(1, 1);
            Bitmap bmpSrc1 = new Bitmap(path, true);

            ConsoleWriteImage2(bmpSrc1);
            Thread.Sleep(1000);
            Console.SetCursorPosition(1, 1);
            Bitmap bmpSrc2 = new Bitmap(path, true);

            ConsoleWriteImage3(bmpSrc2);
            Thread.Sleep(1000);
            Menu.ClearMenuArea();
            string barnardDescription = $"\n             Welcome to {Planet.GetPlanetName(3)}.\n             Bernard's Star B is a cold, dry, and dark planet, inhabited by short furry creatures known as ALFs.\n             However, they have mastered the ability for producing oatmeal cream pies, which all of the \n             planets desire. planet has a natural abundance of gold, which they consider worthless on their own planet,\n             but know that humans from Earth value it for some reason. They primarily\n             desire lightbulbs for not only lighting their dark planet, but as a primary food\n             source.  The many attempts by the ALFs to manufacture lightbulbs to supply\n             their own needs always fail; they eat them before they can develop\n             sufficient enough quantities to fulfill demand.";

            Cutscenes.PrintAnimation(barnardDescription);
            Thread.Sleep(1000);
        }
Ejemplo n.º 2
0
        public static void EarthCutScene()
        {
            Menu.ClearMenuArea();
            string earthNear = $"\n\n                  You are now approaching {Planet.GetPlanetName(1)}";

            Cutscenes.PrintAnimation(earthNear);
            Thread.Sleep(1000);
            string path = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\images/Earth.bmp");

            Menu.ClearMenuArea();
            Console.SetCursorPosition(0, 0);
            Bitmap bmpSrc = new Bitmap(path, true);

            ConsoleWriteImage(bmpSrc);
            Thread.Sleep(1000);
            Console.SetCursorPosition(0, 0);
            Bitmap bmpSrc1 = new Bitmap(path, true);

            ConsoleWriteImage2(bmpSrc1);
            Thread.Sleep(1000);
            Console.SetCursorPosition(0, 0);
            Bitmap bmpSrc2 = new Bitmap(path, true);

            ConsoleWriteImage3(bmpSrc2);
            Thread.Sleep(1000);
            Menu.ClearMenuArea();
            string earthDescription = $"\n             Welcome to {Planet.GetPlanetName(1)}.\n             Earth is no longer a lush, green, wet planet, but now is a dry and grimy\n             industrial powerhouse.\n             Its primary output is Styrofoam and liquid soap.";

            Cutscenes.PrintAnimation(earthDescription);
            Thread.Sleep(1000);
        }
Ejemplo n.º 3
0
        public static void ProximaCutscene()
        {
            Menu.ClearMenuArea();
            string proximaNear = $"\n\n                  You are now approaching {Planet.GetPlanetName(2)}";

            Cutscenes.PrintAnimation(proximaNear);
            Thread.Sleep(1000);
            string path = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\images/Proxima.bmp");

            Menu.ClearMenuArea();
            Console.SetCursorPosition(0, 0);
            Bitmap bmpSrc = new Bitmap(path, true);

            ConsoleWriteImage(bmpSrc);
            Thread.Sleep(1000);
            Console.SetCursorPosition(0, 0);
            Bitmap bmpSrc1 = new Bitmap(path, true);

            ConsoleWriteImage2(bmpSrc1);
            Thread.Sleep(1000);
            Console.SetCursorPosition(0, 0);
            Bitmap bmpSrc2 = new Bitmap(path, true);

            ConsoleWriteImage3(bmpSrc2);
            Thread.Sleep(1000);
            Menu.ClearMenuArea();
            string proximaDescription = $"\n             Welcome to {Planet.GetPlanetName(2)}.\n             Proxima Centauri 1 is a windy, wet, and warm planet inhabited by a race of beings known as Cylons.\n             Their chief export is lightbulbs, which the Star B's devour and pay a premium for.\n             Their other primary export is water; which Earth requires to survive but is extremely heavy\n             and difficult to ship.\n             They subsist off liquid soap, oatmeal cream pies, and enjoy long walks on the beach.";

            Cutscenes.PrintAnimation(proximaDescription);
            Thread.Sleep(1000);
        }
Ejemplo n.º 4
0
        public static void RobbedBySpacePirate(List <Product> inventories)
        {
            Random random       = new Random();
            int    randomNumber = random.Next(1, 6);

            if (randomNumber == 4)
            {
                Cutscenes.BowserCutscene();
                Menu.ClearMenuArea();
                Console.SetCursorPosition(4, 10);
                Console.WriteLine($"You've been robbed by space pirates on your way to {Planet.GetPlanetName(Global.currentPlanet)} and lost half of your precious inventory!!!");
                Console.SetCursorPosition(4, 12);
                Console.WriteLine($"Luckily, you escaped with your life.");
                Console.SetCursorPosition(6, 20);
                Console.WriteLine("Press the Space Bar to Continue.");
                while (Console.ReadKey(true).Key != ConsoleKey.Spacebar)
                {
                    ;
                }

                //variables to hold the number of each item in the inventory
                int numOfGold       = 0;
                int numOfwater      = 0;
                int numOfLiquidSoap = 0;
                int numOfStyrofoam  = 0;
                int numOfOatmeal    = 0;
                int numOfLightBulbs = 0;

                //get the number of each item in the inventory
                for (int i = 0; i < inventories.Count; i++)
                {
                    if (inventories[i].ProductName == "Gold")
                    {
                        numOfGold += 1;
                    }
                }
                for (int i = 0; i < inventories.Count; i++)
                {
                    if (inventories[i].ProductName == "Water")
                    {
                        numOfwater += 1;
                    }
                }
                for (int i = 0; i < inventories.Count; i++)
                {
                    if (inventories[i].ProductName == "Liquid Soap")
                    {
                        numOfLiquidSoap += 1;
                    }
                }
                for (int i = 0; i < inventories.Count; i++)
                {
                    if (inventories[i].ProductName == "Styrofoam")
                    {
                        numOfStyrofoam += 1;
                    }
                }
                for (int i = 0; i < inventories.Count; i++)
                {
                    if (inventories[i].ProductName == "Oatmeal Pies")
                    {
                        numOfOatmeal += 1;
                    }
                }
                for (int i = 0; i < inventories.Count; i++)
                {
                    if (inventories[i].ProductName == "Light Bulbs")
                    {
                        numOfLightBulbs += 1;
                    }
                }

                //Make sure if the item is 1 in count, it's taken by the pirates, otherwise, take half of the number of that item.
                numOfGold       = numOfGold <= 1 ? numOfGold = 1 : numOfGold /= 2;
                numOfwater      = numOfwater <= 1 ? numOfwater = 1 : numOfwater /= 2;
                numOfLiquidSoap = numOfLiquidSoap <= 1 ? numOfLiquidSoap = 1 : numOfLiquidSoap /= 2;
                numOfStyrofoam  = numOfStyrofoam <= 1 ? numOfStyrofoam = 1 : numOfStyrofoam /= 2;
                numOfOatmeal    = numOfOatmeal <= 1 ? numOfOatmeal = 1 : numOfOatmeal /= 2;
                numOfLightBulbs = numOfLightBulbs <= 1 ? numOfLightBulbs = 1 : numOfLightBulbs /= 2;


                //Go from the bottom of the list upward and remove the correct amount of each type
                for (int i = inventories.Count - 1; i >= 0; i--)
                {
                    if (inventories[i].ProductName == "Gold" && numOfGold != 0)
                    {
                        inventories.RemoveAt(i);
                        numOfGold -= 1;
                    }
                }
                for (int i = inventories.Count - 1; i >= 0; i--)
                {
                    if (inventories[i].ProductName == "Water" && numOfwater != 0)
                    {
                        inventories.RemoveAt(i);
                        numOfwater -= 1;
                    }
                }
                for (int i = inventories.Count - 1; i >= 0; i--)
                {
                    if (inventories[i].ProductName == "Liquid Soap" && numOfLiquidSoap != 0)
                    {
                        inventories.RemoveAt(i);
                        numOfLiquidSoap -= 1;
                    }
                }
                for (int i = inventories.Count - 1; i >= 0; i--)
                {
                    if (inventories[i].ProductName == "Styrofoam" && numOfStyrofoam != 0)
                    {
                        inventories.RemoveAt(i);
                        numOfStyrofoam -= 1;
                    }
                }
                for (int i = inventories.Count - 1; i >= 0; i--)
                {
                    if (inventories[i].ProductName == "Oatmeal Pies" && numOfOatmeal != 0)
                    {
                        inventories.RemoveAt(i);
                        numOfOatmeal -= 1;
                    }
                }
                for (int i = inventories.Count - 1; i >= 0; i--)
                {
                    if (inventories[i].ProductName == "Light Bulbs" && numOfLightBulbs != 0)
                    {
                        inventories.RemoveAt(i);
                        numOfLightBulbs -= 1;
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public void Travel(List <Product> inventories) //change current position
        {
            bool fuelTravel = true;

            Menu.PrintMenu(true);
            int travelPlanet = Navigation().PlanetNum;

            int temp = Global.gas;

            if (Global.currentPlanet == 1 && travelPlanet == 2 || Global.currentPlanet == 2 && travelPlanet == 1)
            {
                Global.gas -= Convert.ToInt32(EarthToPC1 * travelMultiplier);
                if (Global.gas < 0)
                {
                    fuelTravel = false;
                    Menu.ClearMenuArea();
                    Global.gas = temp;
                    Console.SetCursorPosition(35, 10);
                    Console.WriteLine("Not enough Gas to travel...");
                    Console.SetCursorPosition(25, 13);
                    Console.WriteLine($"{Global.name}, please select an action by pressing a key from the menu below.");
                }
                else
                {
                    Global.age           = Convert.ToByte(Global.age + EarthToPC1 / WarpFactor);
                    Global.currentPlanet = Convert.ToByte(travelPlanet);
                }
            }
            if (Global.currentPlanet == 1 && travelPlanet == 3 || Global.currentPlanet == 3 && travelPlanet == 1)
            {
                Global.gas -= Convert.ToInt32(EarthToBernard * travelMultiplier);
                if (Global.gas < 0)
                {
                    fuelTravel = false;
                    Menu.ClearMenuArea();
                    Global.gas = temp;
                    Console.SetCursorPosition(35, 10);
                    Console.WriteLine("Not enough Gas to travel...");
                    Console.SetCursorPosition(25, 13);
                    Console.WriteLine($"{Global.name}, please select an action by pressing a key from the menu below.");
                }
                else
                {
                    byte age = Convert.ToByte(Global.age + EarthToBernard / WarpFactor);
                    Global.age           = age;
                    Global.currentPlanet = Convert.ToByte(travelPlanet);
                }
            }
            if (Global.currentPlanet == 2 && travelPlanet == 3 || Global.currentPlanet == 3 && travelPlanet == 2)
            {
                Global.gas -= Convert.ToInt32(PC1ToBernard * travelMultiplier);
                if (Global.gas < 0)
                {
                    fuelTravel = false;
                    Menu.ClearMenuArea();
                    Global.gas = temp;
                    Console.SetCursorPosition(35, 10);
                    Console.WriteLine("Not enough Gas to travel...");
                    Console.SetCursorPosition(25, 13);
                    Console.WriteLine($"{Global.name}, please select an action by pressing a key from the menu below.");
                }
                else
                {
                    byte age = Convert.ToByte(Global.age + PC1ToBernard / WarpFactor);
                    Global.age           = age;
                    Global.currentPlanet = Convert.ToByte(travelPlanet);
                }
            }
            if (fuelTravel == false)
            {
                return;
            }
            else
            {
                SpacePirate.RobbedBySpacePirate(inventories);
                if (travelPlanet == 1)
                {
                    Cutscenes.EarthCutScene();
                }
                else if (travelPlanet == 2)
                {
                    Cutscenes.ProximaCutscene();
                }
                else if (travelPlanet == 3)
                {
                    Cutscenes.BarnardCutscene();
                }
            }
            return;
        }