Пример #1
0
        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);
        }
Пример #2
0
        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();
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        static void Main(string[] args)
        {
            Human first  = new Human("jon");
            Human second = new Human("alfred");

            first.attack(second);
        }
Пример #7
0
        static void Main(string[] args)
        {
            Human terry = new Human("Terry");
            Human larry = new Human("Larry");

            terry.attack(larry);
        }
Пример #8
0
        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);
        }
Пример #9
0
        static void Main(string[] args)
        {
            Human Ken = new Human("Ken");
            Human Ryu = new Human("Ryu");

            Ken.attack(Ryu);
            Human.getstats(Ryu);
        }
Пример #10
0
        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);
        }
Пример #11
0
        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();
        }
Пример #12
0
        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("#########################################");
        }
Пример #13
0
        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.");
        }
Пример #14
0
        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);
        }
Пример #15
0
        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);
        }