public static void CreateHuman(int magicAge) { Human human = new Human(); human.Age = magicAge; if (magicAge % 2 == 0) { human.FullName = "The Boy"; human.Gender = Gender.Male; } else { human.FullName = "The Girl"; human.Gender = Gender.Female; } }
public static void Main() { Human man = new Human(); CreateHuman(10); Console.WriteLine("{0} {1}", man.FullName, man.Gender); }
public void Fireball(Human human) { Random rand = new Random(); human.Health -= rand.Next(20, 50); }
static void Main(string[] args) { Human h = new Human(); }
public Human Attack(Human Target) { Target.health -= 5 * strength; System.Console.WriteLine(($"{Target.name} was attacked. Health is now at {Target.health}")); return(this); }