title: C# GiantKillerRobotMiniGame
body: <p>I have a robot class which has 2 proprieties:</p>
  <ol>
  <li><p><code>int RobotHealth;</code></p>
  </li>
  <li><p><code>public Intensity Intens;</code> which is an enum you can see below:</p>
  </li>
  </ol>
  <pre><code>enum Intensity
  {
      Low = 10,
      Medium = 20,
      High = 30,
      Kill = 40,
  }
  </code></pre>
  <p>Here is the robot class and the method FireLaser which needs to calculate the difference between the Health of the target and the value of the Intesity which can be Low, Medium, High, Kill. So the problem is the method FireLaser which needs to calculate the difference batten the current target health and the intensity of the laser doesn't do it all and I can't understand why:</p>
  <pre><code>    internal class Robot
      {
          int HealthRobot;
          public Intensity Intens;
          public bool isActive()
          {
  
              if (HealthRobot &gt; 0)
              {
                  return true;
              }
              return false;
          }
          public Robot  (int healthRobot , Intensity intensity)
          {
             HealthRobot = healthRobot;
             Intens = intensity;  
          } 
  
  
          public int FireLaser()
          {
              var Damage =  (int)Robot.Intens;
              var cth = this Target();
              int Health  = cth.Health - Damage;
              Health = cth.Health;
              return Health;
          }
      }
  </code></pre>
  <p>And I created a separated class for the target which verifies if the target is still alive</p>
  <pre><code> public class Target
      {
  
          public int Health;
          int Damage;
          public bool CurrentTargetisAlive ()
          {
  
              if ( Health &gt; 0)
              {
                  return true;
              }
              return false;
          }
      }
  </code></pre>
  <pre><code>public  class Planets
      {
         public Target[] Habitant;
  
          public Planets( Target[] habitant)
          {
              this.Habitant = habitant;
          }
      }
  </code></pre>
  <p>To rephrase my problem is that I want to do a mini game were a robot kills all planets habitants were Planets is an object defined by an array of targets.</p>