react-simple-game-engine 0.0.61 → 0.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/classes/p5.js CHANGED
@@ -47,7 +47,7 @@ var P5 = /** @class */ (function (_super) {
47
47
  var _b = collection_1[_a], item = _b[0], percent = _b[1];
48
48
  _loop_1(item, percent);
49
49
  }
50
- items = this.shuffle(items);
50
+ this.shuffle(items, true);
51
51
  console.log("Collection generated: ", items);
52
52
  return this.random(items);
53
53
  };
package/lib/utils.js CHANGED
@@ -94,19 +94,3 @@ export function copyProperties(source, target) {
94
94
  }
95
95
  }
96
96
  }
97
- function shuffle(array) {
98
- var _a;
99
- var currentIndex = array.length, randomIndex;
100
- // While there remain elements to shuffle.
101
- while (currentIndex != 0) {
102
- // Pick a remaining element.
103
- randomIndex = Math.floor(Math.random() * currentIndex);
104
- currentIndex--;
105
- // And swap it with the current element.
106
- _a = [
107
- array[randomIndex],
108
- array[currentIndex],
109
- ], array[currentIndex] = _a[0], array[randomIndex] = _a[1];
110
- }
111
- return array;
112
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simple-game-engine",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib",