Actually, there's no rng. You just have to press Enter in the right time to end up with three hearts in a row. This may take a little practice.