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; } } }
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); }