volleyballsimtypes 0.0.69 → 0.0.70
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.
|
@@ -19,11 +19,14 @@ class Team {
|
|
|
19
19
|
return this.roster.some(p => p.id === player.id);
|
|
20
20
|
}
|
|
21
21
|
toString() {
|
|
22
|
-
return `${this.name} [${this.shortName}] (${this.country?.name})`;
|
|
22
|
+
return `${this.name} [${this.shortName}] (${this.country?.name}) ELO=${this._rating}`;
|
|
23
23
|
}
|
|
24
24
|
get rating() {
|
|
25
25
|
return this._rating;
|
|
26
26
|
}
|
|
27
|
+
set rating(value) {
|
|
28
|
+
this._rating = value;
|
|
29
|
+
}
|
|
27
30
|
updateRating(ratingChange) {
|
|
28
31
|
if (Math.abs(ratingChange) > match_1.MatchRating.K)
|
|
29
32
|
throw new Error(`INVALID RATING CHANGE: ${ratingChange}`);
|
|
@@ -16,11 +16,14 @@ export class Team {
|
|
|
16
16
|
return this.roster.some(p => p.id === player.id);
|
|
17
17
|
}
|
|
18
18
|
toString() {
|
|
19
|
-
return `${this.name} [${this.shortName}] (${this.country?.name})`;
|
|
19
|
+
return `${this.name} [${this.shortName}] (${this.country?.name}) ELO=${this._rating}`;
|
|
20
20
|
}
|
|
21
21
|
get rating() {
|
|
22
22
|
return this._rating;
|
|
23
23
|
}
|
|
24
|
+
set rating(value) {
|
|
25
|
+
this._rating = value;
|
|
26
|
+
}
|
|
24
27
|
updateRating(ratingChange) {
|
|
25
28
|
if (Math.abs(ratingChange) > MatchRating.K)
|
|
26
29
|
throw new Error(`INVALID RATING CHANGE: ${ratingChange}`);
|