示例#1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the world of Pokemon!");

            // INSTANTIATING out first object (first Hokemon)

            Hokemon HokeObject01 = new Hokemon();

            HokeObject01.get_details();

            System.Threading.Thread.Sleep(555); // Pauses for half a second

            Console.WriteLine("");

            // Create a second Hokemon

            Hokemon Hoke02 = new Hokemon();

            Hoke02.get_details();

            Console.WriteLine("");
            Console.WriteLine("");

            System.Threading.Thread.Sleep(555);

            Battle_Arena firstArena = new Battle_Arena(); //Creating the object 'firstArena' // from the Battle_Arena CLASS

            firstArena.Request_Challenger(HokeObject01);

            System.Threading.Thread.Sleep(400);

            firstArena.Accept_Battle(HokeObject01, Hoke02);

            System.Threading.Thread.Sleep(400);
        }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the world of Hokemon!\n\n");

            Hokemon HokeObject01 = new Hokemon(); // INSTANTIATING our first object

            HokeObject01.get_details();

            System.Threading.Thread.Sleep(1000); // Sleep for 1 second

            // Create a second Hokemon
            Hokemon Hoke02 = new Hokemon();

            Hoke02.get_details();

            HokeObject01.about();
            Hoke02.about();

            /*
             * Halor halorHoke01 = new Halor();
             * halorHoke01.get_details();
             *
             * // Example of POLYMORPHISM with the about method in following objects
             * Hoke02.about();
             * halorHoke01.about();
             */

            Battle_Arena firstArena = new Battle_Arena(); // Instiating the object firstArena

            // from the Battle_Arena CLASS


            firstArena.RequestAChallenger(HokeObject01); // ARGUMENT HokeObject01
                                                         // passed into the
                                                         // firstArena object
                                                         // method Req....
            firstArena.AcceptingTheBattle(HokeObject01, Hoke02);

            firstArena.Battle(HokeObject01, Hoke02); // Starts the Battle
        }