/* The Raindrop class represents a single raindrop, and */
/* contains variables that store its current position.  */
class Raindrop {

   private final int MAX_RIPPLE = 30;
   private final int RIPPLE_STEP = 2;

   private static Random new_size = new Random();

   private int current_size = 0;
   private int visible_size = 0;
   private int x = 1, y = 1;

   public boolean visible() {
      return current_size < visible_size;
   }

   public void set_position (int x_position, int y_position) {
      x = x_position;
      y = y_position;

      visible_size = Math.abs (new_size.nextInt() % MAX_RIPPLE) + 1;
      current_size = 1;
   }

   public void ripple() {
      x = x - RIPPLE_STEP/2;
      y = y - RIPPLE_STEP/2;
      current_size = current_size + RIPPLE_STEP;
   }

   public void draw (Graphics page) {
     //     page.drawRect (x, y, current_size, current_size);
      page.drawOval (x, y, current_size, current_size);
   }

} // class Raindrop

