static void Main(string[] args)
        {
            MineClass mine  = new MineClass("X", 5000, ResouceType.Uranium);
            MineClass mine1 = new MineClass();

            Console.WriteLine("Mine : ");
            printMine(mine.NameProperty, mine.AmountProperty, mine.TypeProperty);
            Console.WriteLine("Resource State is : " + mine.resourceState);
            Console.WriteLine(" ");
            Console.WriteLine("Mine1(default constructor : ");
            printMine(mine1.NameProperty, mine1.AmountProperty, mine1.TypeProperty);
            Console.WriteLine("Resource State is : " + mine1.resourceState);
            Console.WriteLine(" ");

            Miner obj = new Miner("Jack", 45, 100);

            Console.WriteLine("Miner : ");
            printMiner(obj.minerNameProperty, obj.AgeProperty, obj.healthProperty);
            Console.WriteLine("After 4 hits health is : ");
            obj.Heatlh(mine, 4);
            mine.AmountIsChanged += Changed;
            Console.WriteLine(obj.healthProperty);
            Console.WriteLine("After 4 hits amount is : ");
            obj.Mining(mine, 4);
            Console.WriteLine(" ");
            Miner obj1 = new Miner();

            Console.WriteLine("Miner(default constructor) : ");
            printMiner(obj1.minerNameProperty, obj1.AgeProperty, obj1.healthProperty);
            Console.WriteLine(" ");
        }
 public void Heatlh(MineClass m, int h)
 {
     if (m.TypeProperty == ResouceType.Silver)
     {
         health = health - (int)((health * 1) / 100);
     }
     else if (m.TypeProperty == ResouceType.Gold)
     {
         health = health - (int)((health * 1) / 100);
     }
     else
     {
         health -= h * ((int)((health * 10) / 100));
     }
 }
        private static void Changed(object sender, AmountChanged args)
        {
            MineClass mi = (MineClass)sender;

            Console.WriteLine("Old: {0}, New: {1}, Balance: {2}", args.OldAmount, args.NewAmount, args.OldAmount - args.NewAmount);
        }
 public void Mining(MineClass m, int HitCount)
 {
     m.AmountProperty -= HitCount * perHit;
 }