class Rain {

  PVector position = new PVector();
  PVector velocity = new PVector();

  Rain() {
  }
  //end of Rain() routine

  void initial() {
    //INITIAL RAIN VALUES
    position.x = random(0, 800);
    position.y = random(0, 600);
    velocity.x = random(-1, 5);
    velocity.y = random(-1, 5);
  }
  //end of initial() routine
  void display() {
    //RAIN
    stroke(169);
    line(position.x+10, position.y+10, position.x+15, position.y+25);
    
   //DARK TONE
   noStroke();
   fill(25, 10);
   rect(0, 0, 800, 600);
  }
  //end of display() routine

  void update() {
    //move rain randomly downwards
    position.add(velocity);

    if (position.x < +600 || position.y < +600) {
      initial();
    }
    //end of if statement
  }
  //end of update() routine
}
//end of Rain class