예제 #1
0
        static void Main(string[] args)
        {
            // Console.WriteLine("Hello World!");
            Human   roman = new Human("Roman");
            Human   lee   = new Human("lee");
            Wizard  bob   = new Wizard("Bob");
            Wizard  frank = new Wizard("Frank");
            Ninja   alex  = new Ninja("Alex");
            Samurai cat   = new Samurai("KOT");

            roman.Attack(lee);
            Human lendon = new Human("Lendon", 5, 7, 5, 90);

            roman.Attack(lendon);
            Console.WriteLine($"Lendon health: {lendon.Health}");
            Console.WriteLine(lee.Health);
            lendon.Attack(roman);
            Console.WriteLine($"Roman health: {roman.Health}");
            bob.Attack(frank);
            frank.Attack(roman);
            bob.Attack(lee);
            alex.Attack(roman);
            Console.WriteLine($"Roman dexterity is: {roman.Dexterity}");
            cat.Meditate();
            cat.Attack(roman);
            frank.Heal(roman);
            lee.Attack(cat);
            alex.Attack(frank);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Human   Player    = new Human("Player");
            Human   Enemy     = new Human("Enemy", 5, 5, 5, 1055);
            Wizard  AllyOne   = new Wizard("Gandalf");
            Ninja   AllyTwo   = new Ninja("Sekiro");
            Samurai AllyThree = new Samurai("Mr. Samurai");

            Console.WriteLine(AllyThree.Health);
            Enemy.Attack(AllyThree);
            Console.WriteLine(AllyThree.Health);
            AllyThree.Meditate();
            Console.WriteLine(AllyThree.Health);
            AllyOne.Attack(Enemy);
            AllyTwo.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyThree.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyThree.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyThree.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyOne.Heal(Enemy);
            Console.WriteLine(Enemy.Health);
            Console.WriteLine(AllyTwo.Health);
            Enemy.Attack(AllyTwo);
            Console.WriteLine(AllyTwo.Health);
            Enemy.Attack(AllyTwo);
            Console.WriteLine(AllyTwo.Health);
            AllyTwo.Steal(Enemy);
            Console.WriteLine(AllyTwo.Health);
            Console.WriteLine(Enemy.Health);
        }
예제 #3
0
        static void Main(string[] args)
        {
            Human billy = new Human("Billy");
            Human jared = new Human("Jared");

            billy.Attack(jared);
            billy.Attack(jared);
        }
예제 #4
0
파일: Program.cs 프로젝트: kylehawk2/Human
        static void Main(string[] args)
        {
            Human Brad    = new Human("Brad", 10, 10, 10, 1000);
            Human Bradley = new Human("Bradley");

            Bradley.Attack(Brad);
            Bradley.Attack(Brad);
            Console.WriteLine(Brad.health);
        }
예제 #5
0
        static void Main(string[] args)
        {
            Human frank = new Human("Frank", 2, 4, 6, 8);
            Human mike  = new Human("Mike", 5, 6, 12, 100);

            frank.Attack(mike, frank.strength);

            System.Console.WriteLine(mike.health);
            frank.Attack("5", 1);
        }
예제 #6
0
        static void Main(string[] args)
        {
            ///////////////////////////  Human Tests //////////////////////////////
            Human phil = new Human("Phil");
            //System.Console.WriteLine(phil.Name);

            Human sam = new Human("Sam", 5, 7, 5, 120);

            //Console.WriteLine("Character Name: " + sam.Name + " Health: " + sam.Health + " Intelligence: " + sam.Intelligence + " Dexterity: " + sam.Dexterity + " Strength: " + sam.Strength);
            phil.Attack(sam);
            //Console.WriteLine("Character Name: " + sam.Name + " Health: " + sam.Health + " Intelligence: " + sam.Intelligence + " Dexterity: " + sam.Dexterity + " Strength: " + sam.Strength);



            ///////////////////////////  Wizard Tests //////////////////////////////
            Wizard gandolf = new Wizard("Gandolf");

            //System.Console.WriteLine(gandolf.Dexterity);
            //Console.WriteLine("Character Name: " + sam.Name + " Health: " + sam.Health + " Intelligence: " + sam.Intelligence + " Dexterity: " + sam.Dexterity + " Strength: " + sam.Strength);
            gandolf.Heal();
            //System.Console.WriteLine(gandolf.Health);
            //Console.WriteLine("Character Name: " + sam.Name + " Health: " + sam.Health + " Intelligence: " + sam.Intelligence + " Dexterity: " + sam.Dexterity + " Strength: " + sam.Strength);
            gandolf.Fireball(sam);
            // Console.WriteLine("Character Name: " + sam.Name + " Health: " + sam.Health + " Intelligence: " + sam.Intelligence + " Dexterity: " + sam.Dexterity + " Strength: " + sam.Strength);



            ///////////////////////////  Ninja Tests //////////////////////////////

            Ninja dude = new Ninja("dude");

            //Console.WriteLine("Character Name: " + dude.Name + " Health: " + dude.Health + " Intelligence: " + dude.Intelligence + " Dexterity: " + dude.Dexterity + " Strength: " + dude.Strength);

            dude.Steal();
            dude.Get_Away();
            //Console.WriteLine("Character Name: " + dude.Name + " Health: " + dude.Health + " Intelligence: " + dude.Intelligence + " Dexterity: " + dude.Dexterity + " Strength: " + dude.Strength);



            ///////////////////////////  Samurai Tests //////////////////////////////
            Samurai joe  = new Samurai("joe");
            Wizard  test = new Wizard("test");

            joe.Death_Blow(test);
            //System.Console.WriteLine(test.Health);

            phil.Attack(joe);
            //System.Console.WriteLine(joe.Health);
            joe.Meditate();
            //System.Console.WriteLine(joe.Health);
        }
        static void Main(string[] args)
        {
            // Console.WriteLine("Hello World!");
            Human faizan = new Human("Faizan");
            Human binh   = new Human("Binh", 5, 4, 4, 110);

            System.Console.WriteLine(binh.Health);
            //System.Console.WriteLine(faizan.Health);
            binh.Attack(faizan);
            binh.Attack(faizan);
            faizan.Attack(binh);
            faizan.Attack(binh);
            faizan.Attack(binh);
            Console.WriteLine(binh.Health);
        }
예제 #8
0
        static void Main(string[] args)
        {
            Human hum  = new Human("Sven");
            Human hum2 = new Human("Sbeve", 4, 4, 4, 200);

            Console.WriteLine(hum.Attack(hum2));
        }
예제 #9
0
파일: Program.cs 프로젝트: hssol/HumanClass
        static void Main(string[] args)
        {
            Human Bob = new Human("Bob", 5, 5, 5, 100);
            Human Sam = new Human("Sam", 5, 5, 5, 100);

            Bob.Attack(Bob, Sam);
        }
예제 #10
0
        static void Main(string[] args)
        {
            Human trevor = new Human("Trevor");

            Console.WriteLine($"Name: {trevor.Name}");
            Console.WriteLine($"Strength: {trevor.Strength}");
            Console.WriteLine($"Intelligence: {trevor.Intelligence}");
            Console.WriteLine($"Dexterity: {trevor.Dexterity}");
            Console.WriteLine($"Health: {trevor.Health}");

            Human attackee = new Human("Johnathon", 2, 1, 5, 100);

            Console.WriteLine($"Name: {attackee.Name}");
            Console.WriteLine($"Strength: {attackee.Strength}");
            Console.WriteLine($"Intelligence: {attackee.Intelligence}");
            Console.WriteLine($"Dexterity: {attackee.Dexterity}");
            Console.WriteLine($"Health: {attackee.Health}");

            trevor.Attack(attackee);
            Console.WriteLine($"Name: {attackee.Name}");
            Console.WriteLine($"Strength: {attackee.Strength}");
            Console.WriteLine($"Intelligence: {attackee.Intelligence}");
            Console.WriteLine($"Dexterity: {attackee.Dexterity}");
            Console.WriteLine($"Health: {attackee.Health}");
        }
예제 #11
0
        static void Main(string[] args)
        {
            var player1 = new Human("Ryan");
            var player2 = new Human("Satan", 10, 50, 5, 20);

            player2.Attack(player1);
        }
예제 #12
0
        static void Main(string[] args)
        {
            Human John   = new Human("John");
            Human Howard = new Human("Howard");

            System.Console.WriteLine(Howard.Attack(John));
        }
예제 #13
0
        static void Main(string[] args)
        {
            Human me   = new Human("Josiah");
            Human dude = new Human("enemy");

            me.Attack(dude);
        }
예제 #14
0
        static void Main(string[] args)
        {
            Human Conrad = new Human("Conrad");
            Human Daniel = new Human("Daniel");

            Conrad.Attack(Daniel);
        }
예제 #15
0
        public static void Main(string[] args)
        {
            // creating objects
            Human firstborn = new Human("Ashley");
            // Console.WriteLine("This first born strength is " + firstborn.strength + "!");
            // Console.WriteLine("This first born intelligence is " + firstborn.intelligence + "!");
            // Console.WriteLine("This first born dexterity is " + firstborn.dexterity + "!");
            // Console.WriteLine("This first born health is " + firstborn.health + "!");
            // Console.WriteLine("This first born changed name to " + firstborn.name + "!");

            Human2 secondborn = new Human2("Robert");
            // Console.WriteLine("This second born strength is " + secondborn.strength + "!");
            // Console.WriteLine("This second born intelligence is " + secondborn.intelligence + "!");
            // Console.WriteLine("This second born dexterity is " + secondborn.dexterity + "!");
            // Console.WriteLine("This second born health is " + secondborn.health + "!");
            // Console.WriteLine("This second born changed name to " + secondborn.name + "!");
            // set attributes in my contructor
            // if check in my contructor

            string healthactivity = firstborn.Attack(secondborn, firstborn.strength);

            Console.WriteLine(healthactivity);
            // Console.WriteLine("{0}'s health is now: {1}", firstborn.name, firstborn.health);
            string healthactivity2 = secondborn.Attack(firstborn, secondborn.strength);

            Console.WriteLine(healthactivity2);
        }
예제 #16
0
        static void Main(string[] args)
        {
            Human joe  = new Human("joe");
            Human jack = new Human("jackl");

            jack.Attack(joe);
            jack.Attack(joe);
            Human jake = new Human("jake", 5, 5, 5, 120);

            jake.Attack(jack);


            Console.WriteLine("Health: " + joe.getter);
            Console.WriteLine("Health: " + jake.getter);
            Console.WriteLine("Health: " + jack.getter);
        }
예제 #17
0
        static void Main(string[] args)
        {
            Human person_1 = new Human("person_2");
            Human person_2 = new Human("person_1");

            person_1.Attack(person_2);
        }
예제 #18
0
        static void Main(string[] args)
        {
            var p1 = new Human("Bryan");
            var p2 = new Human("Kirill", 2, -9, 4);

            p1.Attack(p2);
        }
예제 #19
0
파일: Program.cs 프로젝트: denys-glu/CSharp
        static void Main(string[] args)
        {
            Human John  = new Human("John");
            Human Amily = new Human("Amily");

            System.Console.WriteLine("John health before attack: " + John.Health);
            System.Console.WriteLine("John health AFTER attack: " + Amily.Attack(John));
        }
예제 #20
0
        static void Main(string[] args)
        {
            Human h1 = new Human("Steve");
            Human h2 = new Human("Sal", 4, 2, 5, 150);

            Console.WriteLine(h2.Health);
            Console.WriteLine(h1.Attack(h2));
        }
예제 #21
0
        static void Main(string[] args)
        {
            Human human  = new Human("Claire");
            Human human2 = new Human("Troy");

            human.Attack(human2);
            Console.WriteLine(human2.Health);
        }
예제 #22
0
        static void Main(string[] args)
        {
            Human Dedalus = new Human("Dedalus");
            Human Natar   = new Human("Natar", 14, 12, 10, 200);

            Natar.Attack(Dedalus);
            Console.WriteLine($"Dedalus has {Dedalus.Health} health remaining.");
        }
예제 #23
0
        static void Main(string[] args)
        {
            Human Alex   = new Human("Alex", 3, 4, 5);
            Human Mathew = new Human("Mathew", 1, 1, 1);

            Alex.Attack(Mathew);
            System.Console.WriteLine(Mathew.health);
        }
예제 #24
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starting program!");
            Human FirstOne  = new Human("Ham");
            Human SecondOne = new Human("Sam");

            FirstOne.Attack(SecondOne);
        }
예제 #25
0
        static void Main(string[] args)
        {
            Human humanOne = new Human("Dave");
            // Attack("Suj");
            Human humanTwo = new Human("Suj", 50, 50, 50, 50);

            humanOne.Attack(humanTwo);
        }
예제 #26
0
        static void Main(string[] args)
        {
            Human Cai    = new Human("Cai");
            Human Irvine = new Human("Irvine");

            Cai.Attack(Irvine);
            Console.WriteLine(Irvine.health);
        }
예제 #27
0
        static void Main(string[] args)
        {
            Human Sophie = new Human("Sophie");
            Human Noel   = new Human("Noel");

            Sophie.Attack(Noel);
            Console.WriteLine(Noel.ShowHealth);
        }
예제 #28
0
        static void Main(string[] args)
        {
            Human person  = new Human("Victor", 5, 20);
            Human person2 = new Human("Zach", 4, 19);

            Console.WriteLine($"i am {person.Dexterity}");
            person.Attack(person2);
        }
예제 #29
0
        static void Main(string[] args)
        {
            Human simba = new Human("Simba", 9001, 100, 500, 1000000);
            Human scar  = new Human("Scar", 1, 1, 1, 1);

            simba.Attack(scar);
            System.Console.WriteLine(scar.Health);
        }
예제 #30
0
파일: Program.cs 프로젝트: olgadruta/CSharp
        static void Main(string[] args)
        {
            // Create a Human to attack
            Human Mary = new Human("Mary");
            Human John = new Human("John");

            Console.WriteLine(Mary.Attack(John));
        }