Пример #1
0
        static void Main(string[] args)
        {
            Generic_Display display = new Generic_Display();
            Generic_Input   input   = new Generic_Input();
            Generic_Alter   alter   = new Generic_Alter();

            SeaMonster big = new SeaMonster();

            InitializeSeaMonsterBig(big);

            FurryMonster jodi = new FurryMonster();

            InitializeFurryMonsterJodi(jodi);

            List <SeaMonster>   seaMonsters   = new List <SeaMonster>();
            List <FurryMonster> furryMonsters = new List <FurryMonster>();

            seaMonsters.Add(big);
            furryMonsters.Add(jodi);

            bool exit = false;

            display.DisplayOpenScreen("Sea Monster Classes", "temp", new string[1] {
                "Eric Grant"
            });

            do
            {
                exit = MainMenu(seaMonsters, furryMonsters, display);
            } while (!exit);
        }
Пример #2
0
        static void DisplayUserAddFurryMonsters(List <FurryMonster> furryMonsters, Generic_Display display)
        {
            Generic_Input    input = new Generic_Input();
            FurryMonsterType monsterType;
            string           uInput;
            int year, month, day;

            display.DisplayNewScreen("Monster Maker");

            FurryMonster furryMonster = new FurryMonster();

            Console.WriteLine("Enter monster name:");
            furryMonster.Name = input.GetString(false);

            Console.WriteLine("Enter monster color:");
            furryMonster.Color = input.GetString(false);

            Console.WriteLine("Does monster have claws (true or false):");
            furryMonster.HasClaws = input.GetBool();

            Console.WriteLine("Enter monster length in meters:");
            furryMonster.Length = input.GetValidInt();

            Console.WriteLine("When was the monster born.");
            Console.WriteLine("Year:");
            do
            {
                year = input.GetValidInt();
            } while (year < 0 || year > 2017);

            Console.WriteLine("Month:");
            do
            {
                month = input.GetValidInt();
            } while (month < 0 || month > 12);

            Console.WriteLine("Day:");
            do
            {
                day = input.GetValidInt();
            } while (day < 0 || day > 31);

            furryMonster.DateOfBirth = new DateTime(year, month, day);

            Console.WriteLine("Enter monster type (Cat, Dog, Horse, Rat):");
            do
            {
                Console.Write(">");
                uInput = Console.ReadLine();
            } while (!Enum.TryParse <FurryMonsterType>(uInput, out monsterType));
            furryMonster.MonsterType = monsterType;

            furryMonsters.Add(furryMonster);

            Console.WriteLine();
            furryMonster.Greeting(furryMonster);

            display.DisplayAnyKey();
        }
Пример #3
0
 static void InitializeFurryMonsterJodi(FurryMonster furryMonster)
 {
     furryMonster.Name        = "Jodi";
     furryMonster.Color       = "White";
     furryMonster.HasClaws    = false;
     furryMonster.Length      = 13;
     furryMonster.DateOfBirth = new DateTime(1965, 3, 6);
     furryMonster.MonsterType = FurryMonsterType.Horse;
 }
Пример #4
0
 static void DisplayFurryMonsterInfo(FurryMonster furryMonster)
 {
     Console.WriteLine($"{furryMonster.Name} is a {furryMonster.Color} {furryMonster.MonsterType} furry monster.");
     if (furryMonster.HasClaws)
     {
         Console.WriteLine("They have sharp claws.");
     }
     else
     {
         Console.WriteLine("They have strong paws.");
     }
     Console.WriteLine($"They are {furryMonster.Length} feet tall.");
     Console.WriteLine($"They were born on {furryMonster.DateOfBirth}");
     Console.WriteLine($"They love their {furryMonster.FavoriteThing}");
     Console.WriteLine();
 }
Пример #5
0
 public void GoodBye(FurryMonster furryMonster)
 {
     Console.WriteLine($"{furryMonster.Name} waves their {furryMonster.FavoriteThing} in the air as they say goodbye.");
 }
Пример #6
0
 public void Greeting(FurryMonster furryMonster)
 {
     Console.WriteLine($"Hello friend 0w0. I am {furryMonster.Name}! I'm your OC now.");
 }