static void Main(string[] args) { Human arandil = new Human("Arandil the Great"); Human beldar = new Human("Beldar the Brave"); int num = 5; arandil.attack(beldar); System.Console.WriteLine(beldar.health); arandil.attack(num); }
static void Main(string[] args) { Human human = new Human("Alex"); Human obj = new Human("Alex", 90, 90, 80, 100); Console.WriteLine(obj.health); obj.attack(); obj.attack(); obj.attack(); obj.attack(); }
static void Main(string[] args) { Human Bob = new Human("Bob"); Human Bill = new Human("Bill"); Bob.attack(Bill); Bill.attack(5); Bill.attack(Bob); Human.howMany(); System.Console.WriteLine(Bob); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Human Creed = new Human("Creed"); Human Kelsey = new Human("Kelsey", 5, 6, 7, 150); Creed.attack(Kelsey); Creed.attack(Kelsey); Console.WriteLine(Kelsey.health); }
static void Main(string[] args) { Human brad = new Human("Brad", 10, 10, 10, 1000); Human mitch = new Human("Mitch", 8, 10, 10, 1000); Console.WriteLine(mitch.health); brad.attack(mitch); Console.WriteLine(mitch.health); brad.attack(mitch); Console.WriteLine(mitch.health); Console.WriteLine(brad.health); mitch.attack(brad); Console.WriteLine(brad.health); }
static void Main(string[] args) { Human first = new Human("jon"); Human second = new Human("alfred"); first.attack(second); }
static void Main(string[] args) { Human terry = new Human("Terry"); Human larry = new Human("Larry"); terry.attack(larry); }
static void Main(string[] args) { // Console.WriteLine("=============== human testing =================="); Human troy = new Human("Troy"); Console.WriteLine(troy.name); Human sam = new Human("Sam", 5, 7, 5, 120); Console.WriteLine("Character Name: " + troy.name + " Health: " + troy.health + " Intelligence: " + troy.intelligence + " Dexterity: " + troy.dexterity + " Strength: " + troy.strength); Console.WriteLine("Character Name: " + sam.name + " Health: " + sam.health + " Intelligence: " + sam.intelligence + " Dexterity: " + sam.dexterity + " Strength: " + sam.strength); Console.WriteLine(troy.name + " is attacking " + sam.name); troy.attack(sam); Console.WriteLine("Character Name: " + troy.name + " Health: " + troy.health + " Intelligence: " + troy.intelligence + " Dexterity: " + troy.dexterity + " Strength: " + troy.strength); Console.WriteLine("Character Name: " + sam.name + " Health: " + sam.health + " Intelligence: " + sam.intelligence + " Dexterity: " + sam.dexterity + " Strength: " + sam.strength); Console.WriteLine("=============== wizard testing =================="); Wizard andonon = new Wizard("Andonon"); Console.WriteLine("Wizard Name: " + andonon.name); Console.WriteLine("Wizard Intelligence: " + andonon.intelligence); Console.WriteLine("=============== wizard andonon is healing humnan troy testing =================="); Console.WriteLine("Troy.health: " + troy.health); Console.WriteLine("Andonon.health: " + andonon.health); andonon.heal(troy); // expect this to fail. Wizard heals Wizards andonon.heal(andonon); // expect to work Console.WriteLine("Troy.health: " + troy.health); Console.WriteLine("Andonon.health: " + andonon.health); }
static void Main(string[] args) { Human Ken = new Human("Ken"); Human Ryu = new Human("Ryu"); Ken.attack(Ryu); Human.getstats(Ryu); }
static void Main(string[] args) { Human x = new Human("zach", 5, 100, 1, 65); Human y = new Human("bobbert", 1, 100, 1, 65); Console.WriteLine(x.name + x.Strength); x.attack(y); Console.WriteLine(y.Health); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Human guy = new Human("Guy", 5, 5, 5, 150); Human dude = new Human("Dude"); guy.attack(dude); guy.showstats(); dude.showstats(); }
static void Main(string[] args) { Human nick = new Human("Nick"); Orc NewOrc = new Orc("Orc1"); Console.WriteLine("#########################################"); Console.WriteLine("Starting battle..."); Console.WriteLine("#########################################"); Console.WriteLine("Character Name: " + nick.name + " Health: " + nick.health); Console.WriteLine("Character Name: " + NewOrc.name + " Health: " + NewOrc.health); Console.WriteLine(nick.name + " is attacking " + NewOrc.name); nick.attack(NewOrc); Console.WriteLine("Character Name: " + nick.name + " Health: " + nick.health); Console.WriteLine("Character Name: " + NewOrc.name + " Health: " + NewOrc.health); Console.WriteLine(nick.name + " is attacking " + NewOrc.name); nick.attack(NewOrc); Console.WriteLine(NewOrc.name + " is attacking " + nick.name); NewOrc.attack(nick); Console.WriteLine("Character Name: " + nick.name + " Health: " + nick.health); Console.WriteLine("Character Name: " + NewOrc.name + " Health: " + NewOrc.health); Console.WriteLine(nick.name + " is attacking " + NewOrc.name); nick.attack(NewOrc); Console.WriteLine(NewOrc.name + " is attacking " + nick.name); NewOrc.attack(nick); Console.WriteLine("Character Name: " + nick.name + " Health: " + nick.health); Console.WriteLine("Character Name: " + NewOrc.name + " Health: " + NewOrc.health); Console.WriteLine("#########################################"); }
static void Main(string[] args) { Human Joe = new Human("Joe", 5, 5, 5, 100); Console.WriteLine($"Joe has {Joe.strength} strength points {Joe.health} points."); Human Dan = new Human("Dan", 10, 7, 8, 200); Console.WriteLine($"Dan has {Dan.strength} strength points, and {Dan.health} points."); Joe.attack(Dan); Console.WriteLine($"Jealous of his health points, Joe f*****g attacked Dan in broad daylight, leaving him with only {Dan.health} health points."); }
static void Main(string[] args) { Human alexis = new Human("alexis"); Console.WriteLine(alexis.name); Console.WriteLine("His strength is {0}", alexis.strength); // Console.WriteLine(alexis.name); Human mike = new Human("mike", 20, 1, 90, 20); alexis.strength = 150; Console.WriteLine("{0} has all these amount different power levels in strength{1}, dexterity{2}, intelligence{3}, health{4}", mike.name, mike.strength, mike.dexterity, mike.intelligence, mike.health); alexis.attack(mike); mike.attack(alexis); }
static void Main(string[] args) { //Create two human objects Human mitchell = new Human("Mitchell"); Human spiderman = new Human("Spiderman"); //Setting and changing all attributes of a human object mitchell.setAttributes("Mitchell", 10, 25, 7, 500); //Attack function and result string result = mitchell.attack(spiderman, mitchell.Strength); Console.WriteLine(result); Console.WriteLine("{0}'s health is now: {1}", spiderman.Name, spiderman.Health); }