/*
 * Bubble class - Bubble.java
 * Copyright (c) 1996 Aggressive Enterprises, INC. All rights reserved.
 *
 * By Leyth Kedidi
 *
 * $Id: Bubble.java,v 1.1 1996/04/22 04:29:05 leyth Exp $
 *
 * $Log: Bubble.java,v $
 * Revision 1.1  1996/04/22 04:29:05  leyth
 * Initial revision
 *
 *
 */

import java.awt.*;
import java.util.*;

class Bubble {
   int x, y;
   int type;
   Random r;

   Bubble(Random r, int w, int h, int maxtypes) {
      this.r = r;
      type = Math.abs(r.nextInt()%maxtypes);
      x = Math.abs(r.nextInt()%w);
      y = h;
   }

   void Reset(int w, int h, int maxtypes) {
      type = Math.abs(r.nextInt()%maxtypes);
      x = Math.abs(r.nextInt()%w);
      y = h + Math.abs(r.nextInt()%(h/3));
   }

   public String toString() {
      return("Bubble " + type + ": " + "(" + x + "," + y + ")");
   }
}
