I have no idea what the original Dr. Mario used for generating pill colors but I'm gonna try to put some work into preventing getting too many or too few of a type of pill
@rainwarrior Totally going to do that, but going to put a comment that's more blunt about the function alongside it
@NovaSquirrel Maybe a scientific paper got the algorithm reverse engineered.
@XerTheSquirrel I'm just doing an implementation of the Least Recently Used algorithm I think some other puzzle games use
@NovaSquirrel Does that make everything even?
@XerTheSquirrel You're less likely to get a pill again until you get the other possible outcomes, so it's more even in the ways that matter, at least.
In a puzzle game I think generally you really don't want true randomness as much as that you want to keep the distribution even.
@NovaSquirrel I hope the relevant code is called "prescription" ;)