I want to consider the simulation of dealing a deck of cards. The deck is simply the list of integers D = [1,2,...,52]. Dealing the cards amounts to generating a random permutation of D.
Here’s how I would do it in java.
public class Shuffle {
private static java.util.Random rand = new java.util.Random();
[...]
Archives for java
generating random permutations
let’s get crazy
Russell Beattie is man with a point of view:
At one point I thought I hated programming because I was just so sick it… It turns out I don’t hate programming, I just hate programming in Java.
In fact, I’d say that many of today’s current hot trends in programming are a direct result of a backlash [...]
Posts