Beispiel #1
0
        private static void GetTeam(DinosaurManager manager)
        {
            RandomizerType type;

            if (!IsUserReplyValidRandomizer("How would you like to randomize your team?", out type))
            {
                if (
                    !IsUserReplyValidRandomizer(
                        "Incorrect option.  Please select a valid randomizer option from those below.", out type))
                {
                    if (!IsUserReplyValidRandomizer("This is your last chance.  Please get it right.", out type))
                    {
                        Exit("Welp, you done mucked it up now.", true);
                    }
                }
            }

            Console.WriteLine($"Randomizer set to {type}.");

            Console.WriteLine("Getting your team...");
            Console.WriteLine();

            var team = manager.GetTeam(type);

            WriteTeam(team);
        }
Beispiel #2
0
        private static DinosaurManager GetDinosaurManager()
        {
            Console.WriteLine("Loading dinosaurs from XML file...");

            var manager = new DinosaurManager(@"C:/Git/JWA-Randomizer/JWA-Randomizer/Dinosaurs.xml");

            manager.LoadDinosaurs();

            Console.WriteLine($"{manager.DinosaurCount} dinosaur{(manager.DinosaurCount == 1 ? string.Empty : "s")} loaded.");
            Console.WriteLine();

            return(manager);
        }