Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            RollingDie die  = new RollingDie();
            RollingDie die2 = new RollingDie(10);

            Console.WriteLine(die);
            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine(die.Roll() + " ");
            }
            //Console.WriteLine(die.GetSidesCount());
            //Console.WriteLine(die.Roll());
            //Console.WriteLine(die.Roll());

            Console.WriteLine(die2);
            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine(die2.Roll() + " ");
            }
            //Console.WriteLine(die2.GetSidesCount());
            //Console.WriteLine(die2.Roll());
            //Console.WriteLine(die2.Roll());


            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public Warrior(string name, int health, int damage, int defense, RollingDie die)
 {
     this.name      = name;
     this.health    = health;
     this.maxHealth = health;
     this.damage    = damage;
     this.defense   = defense;
     this.die       = die;
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            RollingDie die     = new RollingDie(10);
            Warrior    warrior = new Warrior("U", 100, 20, 10, die);
            Warrior    enemy   = new Mage("Majin Boo", 100, 20, 10, die, 35, 40);
            Arena      arena   = new Arena(warrior, enemy, die);

            arena.Fight();
            Console.ReadKey();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            RollingDie die      = new RollingDie(10);
            Warrior    DJ       = new Warrior("DJ", 100, 20, 10, die);
            Warrior    Victoria = new Warrior("Victoria", 60, 18, 15, die);
            Arena      arena    = new Arena(DJ, Victoria, die);

            arena.Fight();
            Console.ReadKey();
        }
Ejemplo n.º 5
0
 public Arena(Warrior warrior1, Warrior warrior2, RollingDie die)
 {
     this.warrior1 = warrior1;
     this.warrior2 = warrior2;
     this.die      = die;
 }
Ejemplo n.º 6
0
 public Mage(string name, int health, int damage, int defense, RollingDie die, int mana, int magicDamage) : base(name, health, damage, defense, die)
 {
     this.mana        = mana;
     this.maxMana     = mana;
     this.magicDamage = magicDamage;
 }