Esempio n. 1
0
        static void Main(string[] args)
        {
            Hokemon hokeObject01 = new Hokemon();

            Console.WriteLine("\nHokemon name is: {0}", hokeObject01.Name);

            hokeObject01.get_details();

            Hokemon hokeObject02 = new Hokemon();

            Console.WriteLine("\nHokemon name is: {0}", hokeObject02.Name);

            hokeObject02.get_details();

            // Using the about method
            hokeObject01.about();

            Battle_Arena firstArena = new Battle_Arena(); // Instantiated Battle_Arena

            firstArena.ChallengeMe(hokeObject01);
            firstArena.ChallengeAccepted(hokeObject02);
            firstArena.Battle(hokeObject01, hokeObject02);

            // Declaring members
            Hinstinct[] ChallengerArray = new Hinstinct[3];

            Random rnd        = new Random();
            bool   repeatGame = true;
            string result;

            // Creating player Hokemon
            Halor playerHokemon01 = new Halor(); // Instantiation from Halor class

            // NPC Hokemon
            for (int i = 0; i < ChallengerArray.Length; i++)
            {
                ChallengerArray[i] = new Hinstinct(); // Instatiating challenger Hokemon
            }

            while (repeatGame == true)
            {
                playerHokemon01.about();
                firstArena.ChallengeMe(playerHokemon01);
                firstArena.Battle(playerHokemon01, ChallengerArray[rnd.Next(0, ChallengerArray.Length)]);

                Console.WriteLine("\nDo you want to repeat the game? (y/n)");
                result = Console.ReadLine();
                if (result.ToLower()[0] == 'n')
                {
                    repeatGame = false;
                }
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Hokeworld! ");

            Hokemon[]    ChallengerArray = new Hokemon[3];
            Battle_Arena firstArena      = new Battle_Arena(); //INSTANTIATED Battle_Arena

            Random rnd = new Random();

            bool   repeatGame;
            string result;

            Hokemon hokeObject01 = new Hokemon();

            hokeObject01.get_details();

            Console.WriteLine("\n*********\n");


            Halor haloHokemon01 = new Halor();

            haloHokemon01.get_details();
            haloHokemon01.about();

            Console.WriteLine("\n*********\n");

            Hystic hystHokemon01 = new Hystic();

            hystHokemon01.get_details();
            hystHokemon01.about();

            Console.WriteLine("\n*********\n");

            // NPC Hokemon

            for (int i = 0; i < ChallengerArray.Length; i++)
            {
                ChallengerArray[i] = new Hokemon(); // INSTATANTIATING Challenger Hokemon
            }


            Battle_Arena firstArena = new Battle_Arena();


            firstArena.Battle(hokeObject01, ChallengerArray[rnd.Next(0, ChallengerArray.Length)]);


            firstArena.ChallengeAccepted(hokeObject01, hystHokemon01); // Passing two objects into
                                                                       // the firstArena
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Console.WriteLine("Hello to Hokeworld!");

            Hokemon hokeObject01 = new Hokemon(); // INSTANTIATION of object hokeObject01

            //Console.WriteLine("Hokemon name is: {0}", hokeObject01.Name);

            hokeObject01.get_details();

            Hokemon hoke02 = new Hokemon();  // INSTANTIATION of object 2

            //Console.WriteLine("Hokemon name is: {0}", hokeObject01.Name);

            Console.WriteLine("Name of Hokemon: {0}", hoke02.Name);
            Console.WriteLine("***********");
            Console.WriteLine("****Details below***");
            hoke02.get_details();

            Hokemon hoke03 = new Hokemon();  // INSTANTIATION of object 2

            //Console.WriteLine("Hokemon name is: {0}", hokeObject01.Name);

            hoke03.get_details();

            Battle_Arena firstArena = new Battle_Arena(); // INSTANTIATED Battle_Arena

            firstArena.ChallengeMe(hokeObject01);

            firstArena.ChallengeAccepted(hokeObject01, hoke03); // Passing two objects into
                                                                // the firstArena
            Hokemon hoke04 = new Hokemon();                     //INSTANTIATION from Hokeon Class

            Halor haloHokemon01 = new Halor();                  //INSTANTIATION from Hokeon Class

            haloHokemon01.get_details();

            //Demonstrating POLYMORPHISM with about method
            //a Hokemon instance hoke02
            //a halor instance haloHokemon01

            hoke02.about();
            haloHokemon01.about()

            /*
             *          Battle_Arena firstArena = new Battle_Arena(); // INSTANTUATED Battle_Arena
             */
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the world of Hokemon!!!\n\n");
            Hokemon hoke1 = new Hokemon();

            hoke1.get_details();

            Hokemon hoke2 = new Hokemon();

            hoke2.get_details();

            Halor halor_hoke1 = new Halor();

            halor_hoke1.get_details();

            Hinstinct hinstinct_hoke1 = new Hinstinct();

            hinstinct_hoke1.get_details();

            Hystic hystic_hoke1 = new Hystic();

            hystic_hoke1.get_details();

            hoke1.about();
            halor_hoke1.about();
            hinstinct_hoke1.about();
            hystic_hoke1.about();

            battle_arena arena1 = new battle_arena(); // creating the object of the first arena

            arena1.challenge_request(hoke1);          //argument hoke1 passed into the first arena

            arena1.accept_battle(hoke1, hoke2);

            arena1.battle(hoke1, hoke2);
        }