raspberry_games_server_game_logic 1.8.253 → 1.8.258

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.
@@ -57,12 +57,6 @@ if (typeof Math.clz32 === 'undefined') {
57
57
  };
58
58
  }(Math.log, Math.LN2);
59
59
  }
60
- if (typeof String.prototype.startsWith === 'undefined') {
61
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
62
- position = position || 0;
63
- return this.lastIndexOf(searchString, position) === position;
64
- }});
65
- }
66
60
  if (typeof String.prototype.endsWith === 'undefined') {
67
61
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
68
62
  var subjectString = this.toString();
@@ -74,6 +68,12 @@ if (typeof String.prototype.endsWith === 'undefined') {
74
68
  return lastIndex !== -1 && lastIndex === position;
75
69
  }});
76
70
  }
71
+ if (typeof String.prototype.startsWith === 'undefined') {
72
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
73
+ position = position || 0;
74
+ return this.lastIndexOf(searchString, position) === position;
75
+ }});
76
+ }
77
77
  //endregion
78
78
  (function (factory) {
79
79
  if (typeof define === 'function' && define.amd)
@@ -979,6 +979,24 @@ if (typeof String.prototype.endsWith === 'undefined') {
979
979
  throw NoSuchElementException_init_$Create$_0('List is empty.');
980
980
  return _this__u8e3s4.o(0);
981
981
  }
982
+ function average(_this__u8e3s4) {
983
+ var sum = 0.0;
984
+ var count = 0;
985
+ var tmp0_iterator = _this__u8e3s4.j();
986
+ while (tmp0_iterator.k()) {
987
+ var element = tmp0_iterator.l();
988
+ sum = sum + element;
989
+ count = count + 1 | 0;
990
+ checkCountOverflow(count);
991
+ }
992
+ var tmp;
993
+ if (count === 0) {
994
+ tmp = NaN;
995
+ } else {
996
+ tmp = sum / count;
997
+ }
998
+ return tmp;
999
+ }
982
1000
  function lastOrNull(_this__u8e3s4) {
983
1001
  return _this__u8e3s4.p() ? null : _this__u8e3s4.o(_this__u8e3s4.m() - 1 | 0);
984
1002
  }
@@ -1108,24 +1126,6 @@ if (typeof String.prototype.endsWith === 'undefined') {
1108
1126
  return iterator.l();
1109
1127
  }
1110
1128
  }
1111
- function average(_this__u8e3s4) {
1112
- var sum = 0.0;
1113
- var count = 0;
1114
- var tmp0_iterator = _this__u8e3s4.j();
1115
- while (tmp0_iterator.k()) {
1116
- var element = tmp0_iterator.l();
1117
- sum = sum + element;
1118
- count = count + 1 | 0;
1119
- checkCountOverflow(count);
1120
- }
1121
- var tmp;
1122
- if (count === 0) {
1123
- tmp = NaN;
1124
- } else {
1125
- tmp = sum / count;
1126
- }
1127
- return tmp;
1128
- }
1129
1129
  function minus(_this__u8e3s4, element) {
1130
1130
  var result = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
1131
1131
  var removed = false;