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 Dispose() { ArcherPlayer = null; RivalPlayer = null; }
public void CheckHealth(int health, bool isHealthy) { var magePlayer = new ArcherPlayer("Name", 5, health); Assert.AreEqual(magePlayer.CheckHealth(), isHealthy); }
public void Setup() { ArcherPlayer = new ArcherPlayer("Name", 5, 100); RivalPlayer = new ArcherPlayer("Name", 5, 100); }