no advanced algorightm, just there is a nexter variable in addition to next, and when dropping, nexter is moved to next, and then nexter is chosen randomlyit looks kinda meh ...
nexter
next