public static void GeneratePlayers(int count) { for (var i = 0; i < count; i++) { BasePlayer player; var name = PlayerNames[new Random().Next(0, PlayerNames.Count)]; var force = new Random().Next(15, 31); var health = new Random().Next(80, 101); switch (new Random().Next(0, 3)) { case 0: player = new KnightPlayer(name, force, health); break; case 1: player = new ArcherPlayer(name, force, health); break; case 2: player = new MagePlayer(name, force, health); break; default: player = null; break; } PlayerLists.Add(player); } }
public void CheckHealth(int health, bool isHealthy) { var magePlayer = new KnightPlayer("Name", 5, health); Assert.AreEqual(magePlayer.CheckHealth(), isHealthy); }
public void Dispose() { KnightPlayer = null; RivalPlayer = null; }
public void Setup() { KnightPlayer = new KnightPlayer("Name", 5, 100); RivalPlayer = new KnightPlayer("Name", 5, 100); }