Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, Welcome to HokeWorld - Home of all Hokemon!");

            // INSTANTIATION of new Hokemon.

            Hokemon hoke01 = new Hokemon(); // INSTANTIATE new Hokemon object referred to as hoke01.name

            hoke01.get_stats();
            Console.WriteLine("Attack Value is : {0}", hoke01.attack_calculator());
            Console.WriteLine("Defense Value is : {0}", hoke01.defense_calculator());

            Console.WriteLine("\n");

            Hokemon hoke02 = new Hokemon();

            hoke02.get_stats();
            Console.WriteLine("Attack Value is : {0}", hoke02.attack_calculator());
            Console.WriteLine("Defense Value is : {0}", hoke02.defense_calculator());

            Console.WriteLine("\n");

            Battle_Arena newBattleObject = new Battle_Arena();

            newBattleObject.request_challenge(hoke02);

            newBattleObject.the_battle(hoke02, hoke01);
        }
Ejemplo n.º 2
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;
                }
            }
        }
Ejemplo n.º 3
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
        }
Ejemplo n.º 4
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
             */
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Hokeworld!");
            Console.WriteLine();

            // instantiate new Hokemon object (player 1)
            Hokemon hoke01 = new Hokemon();

            hoke01.get_details();
            hoke01.about();
            Console.WriteLine();

            // delays
            System.Threading.Thread.Sleep(1000);

            // instantiate new Hokemon object (player 2)
            Hokemon hoke02 = new Hokemon();

            hoke02.get_details();
            hoke02.about();
            Console.WriteLine();

            /*
             * Halor halorHoke01 = new Halor(); // inherits from Halor
             * halorHoke01.get_details();
             *
             * Hokemon hoke04 = new Hokemon(); // instantiation from Hokemon class
             *
             * // demonstrating polymorphism with about method
             * // a Hokemon instance hoke04
             * // a halor instance halorHoke01
             * hoke04.about();
             * halorHoke01.about();
             */

            // creates the object firstArena from Battle_Arena class
            Battle_Arena firstArena = new Battle_Arena();

            firstArena.Request_A_Challenger(hoke01);

            System.Threading.Thread.Sleep(3000);

            firstArena.Accept_The_Battle(hoke01, hoke02);

            firstArena.Battle(hoke01, hoke02);
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello Welcome to Hokeworld, home of the hokemon!");

            //instanation of new Hokemon


            Hokemon hoke01 = new Hokemon();   // INSTANTIATE new Hokemon object referred to as Hoke01

            hoke01.get_details();
            Console.WriteLine("Attack value is: {0}", hoke01.attackCalculator());
            Console.WriteLine("Defence value is: {0}", hoke01.defenceCalculator());
            Hokemon hoke02 = new Hokemon();   // INSTANTIATE Hoke02

            hoke02.get_details();
            Console.WriteLine("Attack value is: {0}", hoke02.attackCalculator());
            Console.WriteLine("Defence value is: {0}", hoke02.defenceCalculator());

            Hokemon hokemonObject = new Hokemon();   // INSTANTIATE hokemonObject

            hokemonObject.get_details();
            Console.WriteLine("Attack value is: {0}", hokemonObject.attackCalculator());
            Console.WriteLine("Defence value is: {0}", hokemonObject.defenceCalculator());

            Hokemon hoke03 = new Hokemon(); // INSTANTIATE from Hokemon Parent class

            HALOR hoke04 = new HALOR();     // INSTANTIATE from Halor child class

            Console.WriteLine("I am part of {0} team.", hoke04.team);



            Battle_Arena newBattleObject = new Battle_Arena();

            newBattleObject.requestAChallenger(hoke03);  // In newBattleObject passing
                                                         // Hoke02 object as an
                                                         // Argument

            newBattleObject.theBattle(hoke03, hoke04);
        }
Ejemplo n.º 7
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
        }