Example #1
0
 public void shootAt(Car c)
 {
     if ( loaded == 0 ) {
         throw new NoShellsLoadedException();
     } else if ( health == 0 ) {
         throw new ZeroHealthException();
     }
     c.takeDamage(damage);
 }