import rebelsky.fun.balloons.Balloon;
import rebelsky.fun.balloons.Strategist;
import rebelsky.fun.balloons.Wind;

/**
 * A simple strategy for winning balloon races.  If you're above ground
 * level, inflate the balloon with a 25% probability.  
 */
public class Popper
  extends Strategist
{
  /**
   * Decide what to do based on knowledge of the balloon status.
   * Ignore the wind.
   */
  public void decide(Balloon b, int maxheight, Wind w) 
  {
    if ((b.getHeight() == 0) || (Math.random() < 0.25)) {
      b.inflate();
    }
  } // decide(Balloon, int, Wind)
} // Popper

