in reply to Re^2: array shuffle
in thread array shuffle

You're using a global variable which you empty the first time around instead of passing the deck to your function. You need to properly scope your variables.