Commits

Shlomi Fish committed d0ab9b8

Included elsewhere.

Comments (0)

Files changed (1)

fc-solve/site/wml/src/js/gen-ms-fc-board.js

  * Under MIT/X11 Licence.
  *
  * */
-Class('MSRand', {
-    has: {
-        seed: { is: rw, },
-    },
-    methods: {
-        rand: function() {
-            this.setSeed((this.getSeed() * 214013 + 2531011) & 0x7FFFFFFF);
-            return ((this.getSeed() >> 16) & 0x7fff);
-        },
-        max_rand: function(mymax) {
-            return this.rand() % mymax;
-        },
-        shuffle: function(deck) {
-            if (deck.length) {
-                var i = deck.length;
-                while (--i) {
-                    var j = this.max_rand(i+1);
-                    var tmp = deck[i];
-                    deck[i] = deck[j];
-                    deck[j] = tmp;
-                }
-            }
-            return deck;
-        },
-    },
-});
 
 function deal_ms_fc_board(seed) {
     var randomizer = new MSRand({ seed: seed });