J
John Joyce
Here's an interesting one-liner to ponder.
0.step(100, rand) { |x| puts x }
Think of timers, for games or whatever, you could easily alter the
pseudo-random stepping increment to make it bigger but random, or
have broader ranges of randomness.
The interval will not be obvious to the user.
0.step(100, rand) { |x| puts x }
Think of timers, for games or whatever, you could easily alter the
pseudo-random stepping increment to make it bigger but random, or
have broader ranges of randomness.
The interval will not be obvious to the user.