public void addRoll(MMRandom rng){
  int result=rng.randomInt(this.faces) + this.min;
  all.addElement(new Integer(result));
  this.total+=result;
  if (keep != -1 && all.size() >= keep) {
    this.total=0;
    Collections.sort(all,Collections.reverseOrder());
    for (int i=0; i < keep; i++) {
      this.total+=all.get(i);
    }
  }
}

public void addRoll ( MMRandom rng ) { int result = rng . randomInt ( this . faces ) + this . min ; all . addElement ( new Integer ( result ) ) ; this . total += result ; if ( keep != - 1 && all . size ( ) >= keep ) { this . total = 0 ; Collections . sort ( all , Collections . reverseOrder ( ) ) ; for ( int i = 0 ; i < keep ; i ++ ) { this . total += all . get ( i ) ; } } }
add the result from the given rng source .
