Esempio n. 1
0
        public List <BaseLocation> GenerateAllLocations()
        {
            List <BaseLocation> Locations = new List <BaseLocation>();

            // Store values for locations
            string houseName    = "Annoying Neighbor's House";
            string houseSummary = @"He always talks about hating banks and keeping money in the guest room mattress.";
            int    houseDiffMin = 10;
            int    houseDiffMax = 80;
            int    houseDiff    = (new Random().Next(houseDiffMin, houseDiffMax));
            int    houseCash    = (new Random().Next(2_000, 150_000));

            string gasName    = "Corner Evan-Eleven";
            string gasSummary = @"Need to fill up the van and get some snacks. Might as well take their cash, too.";
            int    gasDiffMin = 80;
            int    gasDiffMax = 240;
            int    gasDiff    = (new Random().Next(gasDiffMin, gasDiffMax));
            int    gasCash    = (new Random().Next(10, 3_000));

            string wfName    = "Welts Fargo";
            string wfSummary = "An older building with what looks like lack security.";
            int    wfDiffMin = 200;
            int    wfDiffMax = 500;
            int    wfDiff    = (new Random().Next(wfDiffMin, wfDiffMax));
            int    wfCash    = (new Random().Next(88_000, 478_000));

            string pnName    = "Pinnackle National Bank";
            string pnSummary = "Opened a couple years ago, latest security.";
            int    pnDiffMin = 475;
            int    pnDiffMax = 750;
            int    pnDiff    = (new Random().Next(pnDiffMin, pnDiffMax));
            int    pnCash    = (new Random().Next(250__000, 888_000));

            string baName    = "Bank of Amereeka";
            string baSummary = "Just opened a couple days ago. This will be hard.";
            int    baDiffMin = 600;
            int    baDiffMax = 900;
            int    baDiff    = (new Random().Next(baDiffMin, baDiffMax));
            int    baCash    = (new Random().Next(1_000_000, 4_000_000));

            // Instantiate locations
            BaseLocation houseLocation = new BaseLocation(LevelArt.DisplayHouse(), houseName, houseSummary, houseDiff, houseDiffMin, houseDiffMax, houseCash);
            BaseLocation gasLocation   = new BaseLocation(LevelArt.DisplayEvan11(), gasName, gasSummary, gasDiff, gasDiffMin, gasDiffMax, gasCash);
            BaseLocation wfLocation    = new BaseLocation(LevelArt.DisplayWF(), wfName, wfSummary, wfDiff, wfDiffMin, wfDiffMax, wfCash);
            BaseLocation pnLocation    = new BaseLocation(LevelArt.DisplayPNB(), pnName, pnSummary, pnDiff, pnDiffMin, pnDiffMax, pnCash);
            BaseLocation baLocation    = new BaseLocation(LevelArt.DisplayBOA(), baName, baSummary, baDiff, baDiffMin, baDiffMax, baCash);

            // Add locations to list
            Locations.Add(houseLocation);
            Locations.Add(gasLocation);
            Locations.Add(wfLocation);
            Locations.Add(pnLocation);
            Locations.Add(baLocation);

            return(Locations);
        }
Esempio n. 2
0
        public static void LevelSelect(List <BaseCriminal> crew, List <BaseLocation> locations)
        {
            Color.DefaultGray();
            // While there are levels not yet completed, allow user to continue selecting levels
            List <BaseLocation> locationsLeftToRob = locations.Where(l => l.Completed == false).ToList();

            BaseCriminal player = crew.Find(c => c.IsPlayer);

            while (locationsLeftToRob.Count() > 0)
            {
                Console.Clear();
                Console.Write(Heading.DisplayPlanning());
                CrewManagement.DisplayCrewInfo(crew);
                Console.WriteLine(LevelArt.DisplayNashville());

                if (player.PlayerContactCount == 0 && crew.Count() == 1)
                {
                    Console.WriteLine("No crew left to manage");
                    Console.WriteLine("______________________");
                    Console.WriteLine("");
                }
                else
                {
                    Console.WriteLine("1) manage crew");
                    Console.WriteLine("______________");
                    Console.WriteLine("");
                }

                // Iterate through locations, for those that are not completed, then show those options
                locations.ForEach(l =>
                {
                    if (!l.Completed)
                    {
                        if (l.Name == "Annoying Neighbor's House")
                        {
                            Console.WriteLine("2) stakeout Annoying Neighbor's House");
                        }
                        if (l.Name == "Corner Evan-Eleven")
                        {
                            Console.WriteLine("3) stock-up at Corner Evan-Eleven");
                        }
                        if (l.Name == "Welts Fargo")
                        {
                            Console.WriteLine("4) stakeout Welts Fargo");
                        }
                        if (l.Name == "Pinnackle National Bank")
                        {
                            Console.WriteLine("5) stakeout Pinnackle National Bank");
                        }
                        if (l.Name == "Bank of Amereeka")
                        {
                            Console.WriteLine("6) stakeout Bank of Amereeka");
                        }
                    }
                });

                // IF you have ANY money, option 7 is available

                if (player.CrewTotalCash > 0)
                {
                    Console.WriteLine("____________");
                    Console.WriteLine("");
                    if (crew.Count() == 1)
                    {
                        Console.WriteLine("7) end heist spree");
                    }
                    else
                    {
                        Console.WriteLine("7) end heist spree and split cash");
                    }
                }

                // Check to ensure user typed only a number
                int selection = Menu.MenuInput(7);

                switch (selection)
                {
                case 1:
                    if (player.PlayerContactCount == 0 && crew.Count() == 1)
                    {
                        LevelSelect(crew, locations);
                    }
                    else
                    {
                        CrewManagement.ManageCrew(crew, locations);
                    }
                    break;

                case 2:
                    // Annoying Neighbor
                    StakeOutLocation(crew, locations, 2);
                    break;

                case 3:
                    // Evan-Eleven
                    StakeOutLocation(crew, locations, 3);
                    break;

                case 4:
                    // Welts Fargo
                    StakeOutLocation(crew, locations, 4);
                    break;

                case 5:
                    // Pinnackle
                    StakeOutLocation(crew, locations, 5);
                    break;

                case 6:
                    // Amereeka
                    StakeOutLocation(crew, locations, 6);
                    break;

                case 7:
                    // End game - split cash
                    if (player.CrewTotalCash > 0)
                    {
                        Outro.SplitCash(Outro.PrepCrewForEndGame(crew), locations);
                    }
                    break;
                }

                locationsLeftToRob = locations.Where(l => l.Completed == false).ToList();
            }

            Outro.SplitCash(Outro.PrepCrewForEndGame(crew), locations);
        }