class Germs {

  //set variables
  PVector position;
  PVector velocity;

  float germWidth;
  float germHeight;
  color germColor;

  // set the constructor variables
  Germs(float tempPositionX, float tempPositionY, float tempGermWidth, float tempGermHeight, color tempgermColor, float tempVelocityX, float tempVelocityY) {

    position=new PVector(tempPositionX, tempPositionY);
    velocity=new PVector(tempVelocityX, tempVelocityY);

    germWidth=tempGermWidth;
    germHeight=tempGermHeight;

    germColor=tempgermColor;
  }

  Germs() {
    init();
  }

  void init() {
    // germ start values
    position.x=width+random(186);
    position.y=random(0, 400);
    velocity.x=random(-5, -5);
    germColor=color(random(114, 190), random(50, 150), random(67, 167));
  }

  void germUpdate() {
    //move the germs
    position.add(velocity);

    //respawn germs after they move offscreen
    if (position.x<-100) {
      init();
    }
  }

  void drawGerm() {
    //how the germ looks
    fill(germColor);
    ellipse(position.x, position.y, germWidth, germHeight);
  }
}