Ejemplo n.º 1
0
 // Start firing between ship and it's target
 public void Fire(Ship target)
 {
     // If damage is less than opponent's shield
     if (damage < target.Shield)
     {
         // Drain the shield
         target.DrainShield(damage);
     }
     else
     {
         // Drain the strength
         target.DrainStrength(damage);
         // Reduce the shield to 0
         target.EmptyShield();
     }
 }