public static void Main() { Console.WriteLine("Welcome to the Battle for Glory Arena"); Character winner = TournamentBattle.Tournament(ReturnFuncs.RetFighters(4)); Console.WriteLine($"{winner} is the winner of the tournament!"); Console.ReadKey(); }
public static int[] BalanceTest() { int palWin = 0; int ninjaWin = 0; int mageWin = 0; for (int i = 0; i < 100; i++) { Character pal = ReturnFuncs.ReturnRandomCharacter(new CharGenConfig()); Character pal2 = ReturnFuncs.ReturnRandomCharacter(new CharGenConfig()); Character ninja = ReturnFuncs.ReturnRandomCharacter(new CharGenConfig() { MinStrength = 5, MaxStrength = 15, MinAgility = 15, MaxAgility = 25, MinIntelligence = 1, MaxIntelligence = 5 }, CharacterClass.Ninja); Character ninja2 = ReturnFuncs.ReturnRandomCharacter(new CharGenConfig() { MinStrength = 5, MaxStrength = 15, MinAgility = 15, MaxAgility = 25, MinIntelligence = 1, MaxIntelligence = 5 }, CharacterClass.Ninja); Character mage = ReturnFuncs.ReturnRandomCharacter(new CharGenConfig() { MinStrength = 5, MaxStrength = 15, MinAgility = 1, MaxAgility = 5, MinIntelligence = 20, MaxIntelligence = 30 }, CharacterClass.Mage); Character mage2 = ReturnFuncs.ReturnRandomCharacter(new CharGenConfig() { MinStrength = 5, MaxStrength = 15, MinAgility = 1, MaxAgility = 5, MinIntelligence = 20, MaxIntelligence = 30 }, CharacterClass.Mage); List <Character> tourTest = new List <Character>() { pal, ninja, mage, pal2, ninja2, mage2 }; Character winner = TournamentBattle.Tournament(tourTest); switch (winner.Class) { case CharacterClass.Paladin: palWin++; break; case CharacterClass.Ninja: ninjaWin++; break; case CharacterClass.Mage: mageWin++; break; } } return(new int[] { palWin, ninjaWin, mageWin }); }
public static Character CreatePaladin() { Random rnd = new Random(); Character a = new Character { Class = CharacterClass.Paladin, Name = ReturnFuncs.RetNames()[rnd.Next(0, ReturnFuncs.RetNames().Count)], Surname = ReturnFuncs.RetSurnames()[rnd.Next(0, ReturnFuncs.RetSurnames().Count)] }; List <ISpell> list = ReturnFuncs.RetPalSpells(); a.GainSpell(list[0]); for (int i = 0; i < 3; i++) { int tempInt = rnd.Next(1, list.Count); a.GainSpell(list[tempInt]); list.RemoveAt(tempInt); } return(a); }