public static void Main(string[] args) { Arena myArena = new Arena("armeec"); Stat firstGlariatorStat = new Stat(20, 25, 35, 14, 48); Stat secondGlariatorStat = new Stat(40, 40, 40, 40, 40); Stat thirdGlariatorStat = new Stat(20, 25, 35, 14, 48); Weapon firstGlariatorWeapon = new Weapon(5, 28, 100); Weapon secondGlariatorWeapon = new Weapon(5, 28, 100); Weapon thirdGlariatorWeapon = new Weapon(50, 50, 50); Gladiator firstGladiator = new Gladiator("Stoyan", firstGlariatorStat, firstGlariatorWeapon); Gladiator secondGladiator = new Gladiator("Pesho", secondGlariatorStat, secondGlariatorWeapon); Gladiator thirdGladiator = new Gladiator("Gosho", thirdGlariatorStat, thirdGlariatorWeapon); myArena.Add(firstGladiator); myArena.Add(secondGladiator); myArena.Add(thirdGladiator); Gladiator test = myArena.GetGladitorWithHighestStatPower(); System.Console.WriteLine(test); System.Console.WriteLine(myArena.Count); Gladiator strongestGladiator = myArena.GetGladitorWithHighestTotalPower(); System.Console.WriteLine(strongestGladiator); }
public static void Main(string[] args) { //Creates arena Arena arena = new Arena("Armeec"); //Creates stats Stat firstGlariatorStat = new Stat(20, 25, 35, 14, 48); Stat secondGlariatorStat = new Stat(40, 40, 40, 40, 40); Stat thirdGlariatorStat = new Stat(20, 25, 35, 14, 48); //Creates weapons Weapon firstGlariatorWeapon = new Weapon(5, 28, 100); Weapon secondGlariatorWeapon = new Weapon(5, 28, 100); Weapon thirdGlariatorWeapon = new Weapon(50, 50, 50); //Creates gladiators Gladiator firstGladiator = new Gladiator("Stoyan", firstGlariatorStat, firstGlariatorWeapon); Gladiator secondGladiator = new Gladiator("Pesho", secondGlariatorStat, secondGlariatorWeapon); Gladiator thirdGladiator = new Gladiator("Gosho", thirdGlariatorStat, thirdGlariatorWeapon); //Adds gladiators to arena arena.Add(firstGladiator); arena.Add(secondGladiator); arena.Add(thirdGladiator); //Prints gladiators count at the arena Console.WriteLine(arena.Count); //Gets strongest gladiator and print him Gladiator strongestGladiator = arena.GetGladiatorWithHighestTotalPower(); Console.WriteLine(strongestGladiator); //Gets gladiator with the strongest weapon and print him Gladiator bestWeaponGladiator = arena.GetGladiatorWithHighestWeaponPower(); Console.WriteLine(bestWeaponGladiator); //Gets gladiator with the strongest stat and print him Gladiator bestStatGladiator = arena.GetGladiatorWithHighestStatPower(); Console.WriteLine(bestStatGladiator); //Removes gladiator arena.Remove("Gosho"); //Prints gladiators count at the arena Console.WriteLine(arena.Count); //Prints the arena Console.WriteLine(arena); }