@mtgame/core 0.1.82 → 0.1.85

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.
@@ -3347,10 +3347,10 @@ let FootballGameStatistic = class FootballGameStatistic extends BaseModel {
3347
3347
  return this.gameUserId;
3348
3348
  }
3349
3349
  get shots() {
3350
- return (this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0);
3350
+ return Math.floor(10 * ((this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0))) / 10;
3351
3351
  }
3352
3352
  get totalGoals() {
3353
- return (this.goals || 0) + (this.penaltyGoals || 0) + (this.smallPenaltyGoals || 0);
3353
+ return Math.floor(10 * ((this.goals || 0) + (this.penaltyGoals || 0) + (this.smallPenaltyGoals || 0))) / 10;
3354
3354
  }
3355
3355
  get goalsPercent() {
3356
3356
  if (!this.shots || !this.totalGoals) {
@@ -3365,39 +3365,37 @@ let FootballGameStatistic = class FootballGameStatistic extends BaseModel {
3365
3365
  return Math.round(1000 * this.shotsOnGoal / this.shots) / 10;
3366
3366
  }
3367
3367
  get penalties() {
3368
- return (this.penaltyGoals || 0) + (this.penaltyAttempts || 0);
3368
+ return Math.floor(10 * ((this.penaltyGoals || 0) + (this.penaltyAttempts || 0))) / 10;
3369
3369
  }
3370
3370
  get penaltyGoalsPercent() {
3371
3371
  if (!this.penaltyAttempts || !this.penaltyGoals) {
3372
3372
  return 0;
3373
3373
  }
3374
- const penaltyShots = this.penaltyAttempts + this.penaltyGoals;
3375
- return Math.round(1000 * this.penaltyGoals / penaltyShots) / 10;
3374
+ return Math.round(1000 * this.penaltyGoals / this.penalties) / 10;
3376
3375
  }
3377
3376
  get smallPenalties() {
3378
- return (this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0);
3377
+ return Math.floor(10 * ((this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0))) / 10;
3379
3378
  }
3380
3379
  get smallPenaltyGoalsPercent() {
3381
3380
  if (!this.smallPenaltyAttempts || !this.smallPenaltyGoals) {
3382
3381
  return 0;
3383
3382
  }
3384
- const smallPenaltyShots = this.smallPenaltyAttempts + this.smallPenaltyGoals;
3385
- return Math.round(1000 * this.smallPenaltyGoals / smallPenaltyShots) / 10;
3383
+ return Math.round(1000 * this.smallPenaltyGoals / this.smallPenalties) / 10;
3386
3384
  }
3387
3385
  get shotsAgainst() {
3388
- return (this.saves || 0) + (this.goalsAgainst || 0);
3386
+ return Math.floor(10 * ((this.saves || 0) + (this.goalsAgainst || 0))) / 10;
3389
3387
  }
3390
3388
  get penaltyShotsAgainst() {
3391
- return (this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0);
3389
+ return Math.floor(10 * ((this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0))) / 10;
3392
3390
  }
3393
3391
  get smallPenaltyShotsAgainst() {
3394
- return (this.smallPenaltySaves || 0) + (this.smallPenaltyGoalsAgainst || 0);
3392
+ return Math.floor(10 * ((this.smallPenaltySaves || 0) + (this.smallPenaltyGoalsAgainst || 0))) / 10;
3395
3393
  }
3396
3394
  get totalGoalsAgainst() {
3397
- return (this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0) + (this.smallPenaltyGoalsAgainst || 0) + (this.autoGoalsAgainst || 0);
3395
+ return Math.floor(10 * ((this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0) + (this.smallPenaltyGoalsAgainst || 0) + (this.autoGoalsAgainst || 0))) / 10;
3398
3396
  }
3399
3397
  get totalSaves() {
3400
- return (this.saves || 0) + (this.penaltySaves || 0) + (this.smallPenaltySaves || 0);
3398
+ return Math.floor(10 * ((this.saves || 0) + (this.penaltySaves || 0) + (this.smallPenaltySaves || 0))) / 10;
3401
3399
  }
3402
3400
  get savesPercent() {
3403
3401
  if (!this.shotsAgainst || !this.saves) {
@@ -3485,10 +3483,10 @@ let FootballStatistic = class FootballStatistic extends BaseModel {
3485
3483
  return `${minutes < 10 ? 0 : ''}${minutes}:${seconds < 10 ? 0 : ''}${seconds}`;
3486
3484
  }
3487
3485
  get penalties() {
3488
- return (this.penaltyGoals || 0) + (this.penaltyAttempts || 0);
3486
+ return Math.floor(10 * ((this.penaltyGoals || 0) + (this.penaltyAttempts || 0))) / 10;
3489
3487
  }
3490
3488
  get smallPenalties() {
3491
- return (this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0);
3489
+ return Math.floor(10 * ((this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0))) / 10;
3492
3490
  }
3493
3491
  get tournamentTeamPoints() {
3494
3492
  return this.tournamentTeam && this.tournamentTeam.points;
@@ -4138,19 +4136,19 @@ let VolleyballStatistic = class VolleyballStatistic extends BaseModel {
4138
4136
  return this.tournamentTeam && this.tournamentTeam.points;
4139
4137
  }
4140
4138
  get totalReceives() {
4141
- return this.receives + this.excellentReceives + this.receiveFaults;
4139
+ return Math.floor(10 * (this.receives + this.excellentReceives + this.receiveFaults)) / 10;
4142
4140
  }
4143
4141
  get totalServeReceives() {
4144
- return this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults;
4142
+ return Math.floor(10 * (this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults)) / 10;
4145
4143
  }
4146
4144
  get totalServes() {
4147
- return this.serveAces + this.serveHits + this.serveFaults;
4145
+ return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults)) / 10;
4148
4146
  }
4149
4147
  get totalAttacks() {
4150
- return this.attackSpikes + this.attackShots + this.attackFaults;
4148
+ return Math.floor(10 * (this.attackSpikes + this.attackShots + this.attackFaults)) / 10;
4151
4149
  }
4152
4150
  get totalBlocks() {
4153
- return this.stuffBlocks + this.blockRebounds + this.blockFaults;
4151
+ return Math.floor(10 * (this.stuffBlocks + this.blockRebounds + this.blockFaults)) / 10;
4154
4152
  }
4155
4153
  static toFront(data) { }
4156
4154
  static toBack(data) { }
@@ -4574,6 +4572,14 @@ class TournamentApi {
4574
4572
  }))).toPromise();
4575
4573
  });
4576
4574
  }
4575
+ getGamesDates(tournamentId) {
4576
+ return __awaiter(this, void 0, void 0, function* () {
4577
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament/${tournamentId}/games_dates/`, { observe: 'response' }).pipe(map(result => ({
4578
+ total: +result.headers.get('X-Page-Count'),
4579
+ data: result.body
4580
+ }))).toPromise();
4581
+ });
4582
+ }
4577
4583
  getGroups(tournamentId) {
4578
4584
  return __awaiter(this, void 0, void 0, function* () {
4579
4585
  return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament/${tournamentId}/groups/`)
@@ -7251,25 +7257,25 @@ let VolleyballGameStatistic = class VolleyballGameStatistic extends BaseModel {
7251
7257
  return this.gameUserId;
7252
7258
  }
7253
7259
  get attacks() {
7254
- return this.attackSpikes + this.attackShots;
7260
+ return Math.floor(10 * (this.attackSpikes + this.attackShots)) / 10;
7255
7261
  }
7256
7262
  get blocks() {
7257
- return this.stuffBlocks + this.blockRebounds;
7263
+ return Math.floor(10 * (this.stuffBlocks + this.blockRebounds)) / 10;
7258
7264
  }
7259
7265
  get totalReceives() {
7260
- return this.receives + this.excellentReceives + this.receiveFaults;
7266
+ return Math.floor(10 * (this.receives + this.excellentReceives + this.receiveFaults)) / 10;
7261
7267
  }
7262
7268
  get totalServeReceives() {
7263
- return this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults;
7269
+ return Math.floor(10 * (this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults)) / 10;
7264
7270
  }
7265
7271
  get totalServes() {
7266
- return this.serveAces + this.serveHits + this.serveFaults;
7272
+ return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults)) / 10;
7267
7273
  }
7268
7274
  get totalAttacks() {
7269
- return this.attackSpikes + this.attackShots + this.attackFaults;
7275
+ return Math.floor(10 * (this.attackSpikes + this.attackShots + this.attackFaults)) / 10;
7270
7276
  }
7271
7277
  get totalBlocks() {
7272
- return this.stuffBlocks + this.blockRebounds + this.blockFaults;
7278
+ return Math.floor(10 * (this.stuffBlocks + this.blockRebounds + this.blockFaults)) / 10;
7273
7279
  }
7274
7280
  static toFront(data) { }
7275
7281
  static toBack(data) { }