texas.js
function (format) {
		var res = _.range(1, deckSize + 1);
		var buffer = crypto.randomBytes(deckSize << 2);
		for (var pos = res.length - 1; pos > 0; pos--) {
			var rand = buffer.readUInt32LE(pos << 2) % (pos + 1);
			var temp = res[pos];
			res[pos] = res[rand];
			res[rand] = temp;
		};
		return format ? _.map(res, format) : res;
	}
function (format) {
		var res = _.range(1, deckSize + 1);
		var buffer = crypto.randomBytes(deckSize << 2);
		for (var pos = res.length - 1; pos > 0; pos--) {
			var rand = buffer.readUInt32LE(pos << 2) % (pos + 1);
			var temp = res[pos];
			res[pos] = res[rand];
			res[rand] = temp;
		};
		return format ? _.map(res, format) : res;
	}
function ( format ) { var res = _ . range ( 1 , deckSize + 1 ) ; var buffer = crypto . randomBytes ( deckSize << 2 ) ; for ( var pos = res . length - 1 ; pos > 0 ; pos -- ) { var rand = buffer . readUInt32LE ( pos << 2 ) % ( pos + 1 ) ; var temp = res [ pos ] ; res [ pos ] = res [ rand ] ; res [ rand ] = temp ; } ; return format ? _ . map ( res , format ) : res ; }
Creates a new shuffled deck.
Creates a new shuffled deck .