public void startABattle(hokemon object01, hokemon object02) { Console.WriteLine("{0}: I want a battle", object01.Name); Console.WriteLine("{0}: I accept", object02.Name); Console.WriteLine("{0}: Says I have an attack of {2}\n I don't care I can defend with {3}!!", object01.Name, object02.Name, object01.attackCalculator(), object02.defenceCalculator() ); }
static void Main(string[] args) { Console.WriteLine("Hello welcome to Hokeworld home of the hokemon!"); // Instantiation of new hokemon hokemon hoke01 = new hokemon(); // INSTANTIATE new hokemon object referred to as Hoke01 hoke01.get_details(); hokemon hoke02 = new hokemon(); // INSTANTIATE Hoke02 hoke02.get_details(); BattleArena myBattle = new BattleArena(); // INSTANTIATING the myBattle OBJECT from the BattleArena class myBattle.Talk(hoke01); // Passing the OBJECT hoke01 and all the attributes into myBattle.startABattle(hoke01, hoke02); /* * hokemon hoke02 = new hokemon(); // INSTANTIATE Hoke02 * * hoke02.get_details(); */ }
public void Talk(hokemon Talker) { Console.WriteLine("Hello my name is {0}", Talker.Name); }