jl-sprt-match 1.0.6 → 1.1.0

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.
Files changed (53) hide show
  1. package/dist/engines/americanFootball/AmericanFootballMatchPlay.d.ts +33 -0
  2. package/dist/engines/americanFootball/AmericanFootballMatchPlay.js +90 -0
  3. package/dist/engines/americanFootball/AmericanFootballMatchPlay.js.map +1 -0
  4. package/dist/engines/football/FootballMatchPlay.d.ts +47 -0
  5. package/dist/engines/football/FootballMatchPlay.js +141 -0
  6. package/dist/engines/football/FootballMatchPlay.js.map +1 -0
  7. package/dist/engines/volleyball/VolleyballMatchPlay.d.ts +35 -0
  8. package/dist/engines/volleyball/VolleyballMatchPlay.js +118 -0
  9. package/dist/engines/volleyball/VolleyballMatchPlay.js.map +1 -0
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +3 -3
  12. package/dist/index.js.map +1 -1
  13. package/dist/profiles/americanFootball/AmericanFootballMatch.js +1 -1
  14. package/dist/profiles/americanFootball/AmericanFootballMatch.js.map +1 -1
  15. package/dist/profiles/americanFootball/AmericanFootballProfile.d.ts +2 -0
  16. package/dist/profiles/americanFootball/AmericanFootballProfile.js +4 -2
  17. package/dist/profiles/americanFootball/AmericanFootballProfile.js.map +1 -1
  18. package/dist/profiles/americanFootball/AmericanFootballResult.d.ts +6 -0
  19. package/dist/profiles/americanFootball/AmericanFootballResult.js +8 -0
  20. package/dist/profiles/americanFootball/AmericanFootballResult.js.map +1 -1
  21. package/dist/profiles/americanFootball/AmericanFootballSerie.d.ts +4 -10
  22. package/dist/profiles/americanFootball/AmericanFootballSerie.js +4 -48
  23. package/dist/profiles/americanFootball/AmericanFootballSerie.js.map +1 -1
  24. package/dist/profiles/football/FootballMatch.js +1 -1
  25. package/dist/profiles/football/FootballMatch.js.map +1 -1
  26. package/dist/profiles/football/FootballProfile.d.ts +2 -0
  27. package/dist/profiles/football/FootballProfile.js +4 -2
  28. package/dist/profiles/football/FootballProfile.js.map +1 -1
  29. package/dist/profiles/football/FootballResult.d.ts +6 -0
  30. package/dist/profiles/football/FootballResult.js +8 -0
  31. package/dist/profiles/football/FootballResult.js.map +1 -1
  32. package/dist/profiles/football/FootballSerie.d.ts +10 -6
  33. package/dist/profiles/football/FootballSerie.js +18 -41
  34. package/dist/profiles/football/FootballSerie.js.map +1 -1
  35. package/dist/profiles/volleyball/VolleyballMatch.js +1 -1
  36. package/dist/profiles/volleyball/VolleyballMatch.js.map +1 -1
  37. package/dist/profiles/volleyball/VolleyballProfile.d.ts +1 -1
  38. package/dist/profiles/volleyball/VolleyballResult.d.ts +6 -0
  39. package/dist/profiles/volleyball/VolleyballResult.js +8 -0
  40. package/dist/profiles/volleyball/VolleyballResult.js.map +1 -1
  41. package/dist/profiles/volleyball/VolleyballSerie.d.ts +13 -15
  42. package/dist/profiles/volleyball/VolleyballSerie.js +28 -64
  43. package/dist/profiles/volleyball/VolleyballSerie.js.map +1 -1
  44. package/package.json +2 -2
  45. package/dist/profiles/americanFootball/AmericanFootballMatchPlay.d.ts +0 -85
  46. package/dist/profiles/americanFootball/AmericanFootballMatchPlay.js +0 -273
  47. package/dist/profiles/americanFootball/AmericanFootballMatchPlay.js.map +0 -1
  48. package/dist/profiles/football/FootballMatchPlay.d.ts +0 -88
  49. package/dist/profiles/football/FootballMatchPlay.js +0 -298
  50. package/dist/profiles/football/FootballMatchPlay.js.map +0 -1
  51. package/dist/profiles/volleyball/VolleyballMatchPlay.d.ts +0 -44
  52. package/dist/profiles/volleyball/VolleyballMatchPlay.js +0 -234
  53. package/dist/profiles/volleyball/VolleyballMatchPlay.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ import { A_MatchPlay, MatchContextProvider } from "jl-sprt-core";
2
+ import { IAmericanFootballScore } from "../../scores";
3
+ import { AmericanFootballRoster } from "../../profiles/americanFootball/AmericanFootballRoster";
4
+ /**
5
+ * Simulación de un partido de American Football sobre el template method.
6
+ *
7
+ * REGULAR: 80 minutos (con entretiempo que no suma tiempo de juego). Un partido
8
+ * sin serie puede terminar empatado.
9
+ * TIEBREAK (sólo si debe definir la serie y el agregado sigue empatado):
10
+ * overtime por períodos; se juega un período y, si el agregado sigue empatado,
11
+ * se juega otro, hasta romper el empate. Los puntos del overtime suman al
12
+ * agregado, de modo que la serie se define naturalmente.
13
+ *
14
+ * Cada `playRegularInterval` / `playTieBreakInterval` = 5 minutos de juego.
15
+ */
16
+ export declare class AmericanFootballMatchPlay extends A_MatchPlay<IAmericanFootballScore, AmericanFootballRoster> {
17
+ private static readonly HALFTIME_AT_MINUTE;
18
+ private static readonly HALFTIME_INTERVALS;
19
+ private static readonly REGULAR_TIME;
20
+ /** Duración de un período de overtime (minutos). */
21
+ private static readonly OVERTIME_PERIOD;
22
+ private _breakLeft;
23
+ private _halftimeDone;
24
+ /** Minutos jugados del período de overtime en curso. */
25
+ private _overtimePlayed;
26
+ constructor(contextProvider?: MatchContextProvider<IAmericanFootballScore>);
27
+ protected startPlay(one: AmericanFootballRoster, two: AmericanFootballRoster): void;
28
+ protected regularTimeIsOver(): boolean;
29
+ protected playRegularInterval(): void;
30
+ protected playTieBreakInterval(): void;
31
+ protected tieBreakIsResolved(): boolean;
32
+ private playScore;
33
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AmericanFootballMatchPlay = void 0;
4
+ const jl_sprt_core_1 = require("jl-sprt-core");
5
+ const randomSource_1 = require("../../randomSource");
6
+ const AmericanFootballResult_1 = require("../../profiles/americanFootball/AmericanFootballResult");
7
+ /**
8
+ * Simulación de un partido de American Football sobre el template method.
9
+ *
10
+ * REGULAR: 80 minutos (con entretiempo que no suma tiempo de juego). Un partido
11
+ * sin serie puede terminar empatado.
12
+ * TIEBREAK (sólo si debe definir la serie y el agregado sigue empatado):
13
+ * overtime por períodos; se juega un período y, si el agregado sigue empatado,
14
+ * se juega otro, hasta romper el empate. Los puntos del overtime suman al
15
+ * agregado, de modo que la serie se define naturalmente.
16
+ *
17
+ * Cada `playRegularInterval` / `playTieBreakInterval` = 5 minutos de juego.
18
+ */
19
+ class AmericanFootballMatchPlay extends jl_sprt_core_1.A_MatchPlay {
20
+ constructor(contextProvider) {
21
+ super(contextProvider);
22
+ this._breakLeft = 0;
23
+ this._halftimeDone = false;
24
+ /** Minutos jugados del período de overtime en curso. */
25
+ this._overtimePlayed = 0;
26
+ }
27
+ startPlay(one, two) {
28
+ this._result = new AmericanFootballResult_1.AmericanFootballResult(one.id, two.id);
29
+ this._breakLeft = 0;
30
+ this._halftimeDone = false;
31
+ this._overtimePlayed = 0;
32
+ }
33
+ // --- tiempo regular -------------------------------------------------------
34
+ regularTimeIsOver() {
35
+ return this._breakLeft === 0 && this._time >= AmericanFootballMatchPlay.REGULAR_TIME;
36
+ }
37
+ playRegularInterval() {
38
+ if (this._breakLeft > 0) {
39
+ this._breakLeft--;
40
+ return;
41
+ }
42
+ if (!this._halftimeDone && this._time >= AmericanFootballMatchPlay.HALFTIME_AT_MINUTE) {
43
+ this._halftimeDone = true;
44
+ this._breakLeft = AmericanFootballMatchPlay.HALFTIME_INTERVALS - 1;
45
+ return;
46
+ }
47
+ this._time += 5;
48
+ this.playScore();
49
+ }
50
+ // --- fase de desempate: overtime por períodos -----------------------------
51
+ playTieBreakInterval() {
52
+ this._time += 5;
53
+ this._overtimePlayed += 5;
54
+ this.playScore();
55
+ if (this._overtimePlayed >= AmericanFootballMatchPlay.OVERTIME_PERIOD) {
56
+ // Fin del período. Si sigue empatado se juega otro (se reinicia el contador).
57
+ this._overtimePlayed = 0;
58
+ }
59
+ }
60
+ tieBreakIsResolved() {
61
+ // Resuelto cuando el agregado de la serie deja de estar empatado.
62
+ const ctx = this.context;
63
+ return !!ctx && ctx.isSerieDecidedWith(this._result);
64
+ }
65
+ // --- anotaciones ----------------------------------------------------------
66
+ playScore() {
67
+ const result = this._result;
68
+ // Touchdown + punto extra.
69
+ if ((0, randomSource_1.randomFloat)() < 0.10) {
70
+ result.addScore(this._teamOne.id, "touchdown");
71
+ result.addScore(this._teamOne.id, "extraPoint");
72
+ }
73
+ if ((0, randomSource_1.randomFloat)() < 0.08) {
74
+ result.addScore(this._teamTwo.id, "touchdown");
75
+ result.addScore(this._teamTwo.id, "extraPoint");
76
+ }
77
+ // Field goals.
78
+ if ((0, randomSource_1.randomFloat)() < 0.04)
79
+ result.addScore(this._teamOne.id, "fieldGoal");
80
+ if ((0, randomSource_1.randomFloat)() < 0.03)
81
+ result.addScore(this._teamTwo.id, "fieldGoal");
82
+ }
83
+ }
84
+ exports.AmericanFootballMatchPlay = AmericanFootballMatchPlay;
85
+ AmericanFootballMatchPlay.HALFTIME_AT_MINUTE = 40;
86
+ AmericanFootballMatchPlay.HALFTIME_INTERVALS = 3;
87
+ AmericanFootballMatchPlay.REGULAR_TIME = 80;
88
+ /** Duración de un período de overtime (minutos). */
89
+ AmericanFootballMatchPlay.OVERTIME_PERIOD = 20;
90
+ //# sourceMappingURL=AmericanFootballMatchPlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmericanFootballMatchPlay.js","sourceRoot":"","sources":["../../../src/engines/americanFootball/AmericanFootballMatchPlay.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGjE,qDAAiD;AACjD,mGAAgG;AAEhG;;;;;;;;;;;GAWG;AACH,MAAa,yBAA0B,SAAQ,0BAA2D;IAcxG,YAAY,eAA8D;QACxE,KAAK,CAAC,eAAe,CAAC,CAAC;QAPjB,eAAU,GAAG,CAAC,CAAC;QACf,kBAAa,GAAG,KAAK,CAAC;QAE9B,wDAAwD;QAChD,oBAAe,GAAG,CAAC,CAAC;IAI5B,CAAC;IAES,SAAS,CAAC,GAA2B,EAAE,GAA2B;QAC1E,IAAI,CAAC,OAAO,GAAG,IAAI,+CAAsB,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,I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AiC,CAAC;QAEtD,2BAA2B;QAC3B,IAAI,IAAA,0BAAW,GAAE,GAAG,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAS,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;YAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAS,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,IAAA,0BAAW,GAAE,GAAG,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAS,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;YAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAS,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC;QACD,eAAe;QACf,IAAI,IAAA,0BAAW,GAAE,GAAG,IAAI;YAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAS,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;QAC1E,IAAI,IAAA,0BAAW,GAAE,GAAG,IAAI;YAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAS,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IAC5E,CAAC;;AAhFH,8DAiFC;AA/EyB,4CAAkB,GAAG,EAAE,AAAL,CAAM;AACxB,4CAAkB,GAAG,CAAC,AAAJ,CAAK;AACvB,sCAAY,GAAG,EAAE,AAAL,CAAM;AAC1C,oDAAoD;AAC5B,yCAAe,GAAG,EAAE,AAAL,CAAM"}
@@ -0,0 +1,47 @@
1
+ import { A_MatchPlay, MatchContextProvider } from "jl-sprt-core";
2
+ import { IFootballScore } from "../../scores";
3
+ import { FootballRoster } from "../../profiles/football/FootballRoster";
4
+ /**
5
+ * Simulación de un partido de fútbol sobre el template method de A_MatchPlay.
6
+ *
7
+ * Fases:
8
+ * - REGULAR: 80 minutos de juego (con entretiempo que no suma tiempo de juego).
9
+ * - TIEBREAK (sólo si el partido debe definir la serie y sigue empatada):
10
+ * 1) alargue de hasta 20 minutos (los goles del alargue pueden definir);
11
+ * 2) si tras el alargue el agregado sigue empatado, tanda de penales.
12
+ *
13
+ * Cada `playRegularInterval` / `playTieBreakInterval` representa 5 minutos de juego.
14
+ */
15
+ export declare class FootballMatchPlay extends A_MatchPlay<IFootballScore, FootballRoster> {
16
+ /** Minuto de juego en que comienza el entretiempo. */
17
+ private static readonly HALFTIME_AT_MINUTE;
18
+ /** Intervalos de descanso del entretiempo. */
19
+ private static readonly HALFTIME_INTERVALS;
20
+ /** Final del tiempo reglamentario (minutos). */
21
+ private static readonly REGULAR_TIME;
22
+ /** Duración del alargue (minutos). */
23
+ private static readonly EXTRA_TIME;
24
+ /** Rondas de penales que se ejecutan por intervalo de desempate. */
25
+ private static readonly PENALTIES_PER_INTERVAL;
26
+ /** Rondas regulares de la tanda de penales. */
27
+ private static readonly REGULAR_PENALTY_ROUNDS;
28
+ private _breakLeft;
29
+ private _halftimeDone;
30
+ /** Minutos jugados de alargue. */
31
+ private _extraTimePlayed;
32
+ /** ¿ya se agotó el alargue? (si sí y sigue empatado, van penales) */
33
+ private _extraTimeOver;
34
+ /** ¿estamos en tanda de penales? */
35
+ private _penalties;
36
+ private _penaltyRound;
37
+ constructor(contextProvider?: MatchContextProvider<IFootballScore>);
38
+ protected startPlay(one: FootballRoster, two: FootballRoster): void;
39
+ protected regularTimeIsOver(): boolean;
40
+ protected playRegularInterval(): void;
41
+ protected playTieBreakInterval(): void;
42
+ protected tieBreakIsResolved(): boolean;
43
+ private playGoals;
44
+ private playPenalties;
45
+ /** ¿La tanda de penales ya tiene ganador? */
46
+ private penaltiesHaveWinner;
47
+ }
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FootballMatchPlay = void 0;
4
+ const jl_sprt_core_1 = require("jl-sprt-core");
5
+ const FootballResult_1 = require("../../profiles/football/FootballResult");
6
+ const randomSource_1 = require("../../randomSource");
7
+ /**
8
+ * Simulación de un partido de fútbol sobre el template method de A_MatchPlay.
9
+ *
10
+ * Fases:
11
+ * - REGULAR: 80 minutos de juego (con entretiempo que no suma tiempo de juego).
12
+ * - TIEBREAK (sólo si el partido debe definir la serie y sigue empatada):
13
+ * 1) alargue de hasta 20 minutos (los goles del alargue pueden definir);
14
+ * 2) si tras el alargue el agregado sigue empatado, tanda de penales.
15
+ *
16
+ * Cada `playRegularInterval` / `playTieBreakInterval` representa 5 minutos de juego.
17
+ */
18
+ class FootballMatchPlay extends jl_sprt_core_1.A_MatchPlay {
19
+ constructor(contextProvider) {
20
+ super(contextProvider);
21
+ this._breakLeft = 0;
22
+ this._halftimeDone = false;
23
+ /** Minutos jugados de alargue. */
24
+ this._extraTimePlayed = 0;
25
+ /** ¿ya se agotó el alargue? (si sí y sigue empatado, van penales) */
26
+ this._extraTimeOver = false;
27
+ /** ¿estamos en tanda de penales? */
28
+ this._penalties = false;
29
+ this._penaltyRound = 0;
30
+ }
31
+ startPlay(one, two) {
32
+ this._result = new FootballResult_1.FootballResult(one.id, two.id);
33
+ this._breakLeft = 0;
34
+ this._halftimeDone = false;
35
+ this._extraTimePlayed = 0;
36
+ this._extraTimeOver = false;
37
+ this._penalties = false;
38
+ this._penaltyRound = 0;
39
+ }
40
+ // --- tiempo reglamentario -------------------------------------------------
41
+ regularTimeIsOver() {
42
+ return this._breakLeft === 0 && this._time >= FootballMatchPlay.REGULAR_TIME;
43
+ }
44
+ playRegularInterval() {
45
+ // Entretiempo: consume intervalos de descanso sin avanzar el tiempo de juego.
46
+ if (this._breakLeft > 0) {
47
+ this._breakLeft--;
48
+ return;
49
+ }
50
+ if (!this._halftimeDone && this._time >= FootballMatchPlay.HALFTIME_AT_MINUTE) {
51
+ this._halftimeDone = true;
52
+ this._breakLeft = FootballMatchPlay.HALFTIME_INTERVALS - 1;
53
+ return;
54
+ }
55
+ this._time += 5;
56
+ this.playGoals();
57
+ }
58
+ // --- fase de desempate: alargue -> penales --------------------------------
59
+ playTieBreakInterval() {
60
+ if (this._penalties) {
61
+ this.playPenalties();
62
+ return;
63
+ }
64
+ // Alargue en curso.
65
+ if (this._extraTimePlayed < FootballMatchPlay.EXTRA_TIME) {
66
+ this._time += 5;
67
+ this._extraTimePlayed += 5;
68
+ this.playGoals();
69
+ if (this._extraTimePlayed >= FootballMatchPlay.EXTRA_TIME) {
70
+ this._extraTimeOver = true;
71
+ }
72
+ return;
73
+ }
74
+ // Alargue agotado: comienzan los penales.
75
+ this._extraTimeOver = true;
76
+ this._penalties = true;
77
+ this.playPenalties();
78
+ }
79
+ tieBreakIsResolved() {
80
+ // Durante los penales, se resuelve cuando la tanda tiene ganador.
81
+ if (this._penalties) {
82
+ return this.penaltiesHaveWinner();
83
+ }
84
+ // Durante el alargue, se resuelve si un gol rompió el empate del agregado.
85
+ // (context siempre existe aquí: sólo se entra a tiebreak dentro de una serie.)
86
+ const ctx = this.context;
87
+ if (ctx && ctx.isSerieDecidedWith(this._result)) {
88
+ return true;
89
+ }
90
+ return false;
91
+ }
92
+ // --- anotaciones ----------------------------------------------------------
93
+ playGoals() {
94
+ const result = this._result;
95
+ if ((0, randomSource_1.randomFloat)() < 0.10)
96
+ result.addScore(this._teamOne.id, "goals");
97
+ if ((0, randomSource_1.randomFloat)() < 0.08)
98
+ result.addScore(this._teamTwo.id, "goals");
99
+ }
100
+ playPenalties() {
101
+ const result = this._result;
102
+ const one = this._teamOne.id;
103
+ const two = this._teamTwo.id;
104
+ for (let i = 0; i < FootballMatchPlay.PENALTIES_PER_INTERVAL; i++) {
105
+ if ((0, randomSource_1.randomFloat)() < 0.75)
106
+ result.addScore(one, 'penalties');
107
+ if ((0, randomSource_1.randomFloat)() < 0.75)
108
+ result.addScore(two, 'penalties');
109
+ this._penaltyRound++;
110
+ if (this.penaltiesHaveWinner())
111
+ return;
112
+ }
113
+ }
114
+ /** ¿La tanda de penales ya tiene ganador? */
115
+ penaltiesHaveWinner() {
116
+ const result = this._result;
117
+ const one = result.getScore(this._teamOne.id).penalties;
118
+ const two = result.getScore(this._teamTwo.id).penalties;
119
+ // Primeras 5 rondas: gana quien tenga ventaja insalvable con las rondas que faltan.
120
+ if (this._penaltyRound < FootballMatchPlay.REGULAR_PENALTY_ROUNDS) {
121
+ const roundsRemaining = FootballMatchPlay.REGULAR_PENALTY_ROUNDS - this._penaltyRound;
122
+ return Math.abs(one - two) > roundsRemaining;
123
+ }
124
+ // A partir de la ronda 5: muerte súbita, hay ganador si la ronda quedó desnivelada.
125
+ return one !== two;
126
+ }
127
+ }
128
+ exports.FootballMatchPlay = FootballMatchPlay;
129
+ /** Minuto de juego en que comienza el entretiempo. */
130
+ FootballMatchPlay.HALFTIME_AT_MINUTE = 40;
131
+ /** Intervalos de descanso del entretiempo. */
132
+ FootballMatchPlay.HALFTIME_INTERVALS = 3;
133
+ /** Final del tiempo reglamentario (minutos). */
134
+ FootballMatchPlay.REGULAR_TIME = 80;
135
+ /** Duración del alargue (minutos). */
136
+ FootballMatchPlay.EXTRA_TIME = 20;
137
+ /** Rondas de penales que se ejecutan por intervalo de desempate. */
138
+ FootballMatchPlay.PENALTIES_PER_INTERVAL = 5;
139
+ /** Rondas regulares de la tanda de penales. */
140
+ FootballMatchPlay.REGULAR_PENALTY_ROUNDS = 5;
141
+ //# sourceMappingURL=FootballMatchPlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FootballMatchPlay.js","sourceRoot":"","sources":["../../../src/engines/football/FootballMatchPlay.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGjE,2EAAwE;AACxE,qDAAiD;AAEjD;;;;;;;;;;GAUG;AACH,MAAa,iBAAkB,SAAQ,0BAA2C;IA0BhF,YAAY,eAAsD;QAChE,KAAK,CAAC,eAAe,CAAC,CAAC;QAZjB,eAAU,GAAG,CAAC,CAAC;QACf,kBAAa,GAAG,KAAK,CAAC;QAE9B,kCAAkC;QAC1B,qBAAgB,GAAG,CAAC,CAAC;QAC7B,qEAAq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CAAC;IACrB,CAAC;;AAvIH,8CAwIC;AAtIC,sDAAsD;AAC9B,oCAAkB,GAAG,EAAE,AAAL,CAAM;AAChD,8CAA8C;AACtB,oCAAkB,GAAG,CAAC,AAAJ,CAAK;AAC/C,gDAAgD;AACxB,8BAAY,GAAG,EAAE,AAAL,CAAM;AAC1C,sCAAsC;AACd,4BAAU,GAAG,EAAE,AAAL,CAAM;AACxC,oEAAoE;AAC5C,wCAAsB,GAAG,CAAC,AAAJ,CAAK;AACnD,+CAA+C;AACvB,wCAAsB,GAAG,CAAC,AAAJ,CAAK"}
@@ -0,0 +1,35 @@
1
+ import { A_MatchPlay, MatchContextProvider } from "jl-sprt-core";
2
+ import { IVolleyballScore } from "../../scores";
3
+ import { VolleyballRoster } from "../../profiles/volleyball/VolleyballRoster";
4
+ /**
5
+ * Simulación de un partido de volleyball sobre el template method de A_MatchPlay.
6
+ *
7
+ * REGULAR: se juegan sets al mejor de 5 (primero a 3 sets gana el partido).
8
+ * Sets 1-4 a 25 (diferencia ≥ 2); set 5 a 15 (diferencia ≥ 2).
9
+ * TIEBREAK: sólo en el segundo partido de una serie h&a que quedó 1-1 en partidos.
10
+ * Se juega un golden set único a 15 (diferencia ≥ 2), registrado en
11
+ * `extraSetPoints`, que define la serie.
12
+ *
13
+ * No hay empate natural: siempre hay ganador del partido.
14
+ */
15
+ export declare class VolleyballMatchPlay extends A_MatchPlay<IVolleyballScore, VolleyballRoster> {
16
+ /** Rallies que se juegan por intervalo. */
17
+ private static readonly RALLIES_PER_INTERVAL;
18
+ /** Descanso entre sets (intervalos). */
19
+ private static readonly SET_BREAK_INTERVALS;
20
+ private _currentSetPointsOne;
21
+ private _currentSetPointsTwo;
22
+ private _breakLeft;
23
+ /** Puntos del golden set en curso (fase de desempate). */
24
+ private _goldenPointsOne;
25
+ private _goldenPointsTwo;
26
+ private _goldenResolved;
27
+ constructor(contextProvider?: MatchContextProvider<IVolleyballScore>);
28
+ protected startPlay(one: VolleyballRoster, two: VolleyballRoster): void;
29
+ protected regularTimeIsOver(): boolean;
30
+ protected playRegularInterval(): void;
31
+ /** Juega un rally del set normal; devuelve true si cerró el set. */
32
+ private playSetRally;
33
+ protected playTieBreakInterval(): void;
34
+ protected tieBreakIsResolved(): boolean;
35
+ }
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VolleyballMatchPlay = void 0;
4
+ const jl_sprt_core_1 = require("jl-sprt-core");
5
+ const randomSource_1 = require("../../randomSource");
6
+ const VolleyballResult_1 = require("../../profiles/volleyball/VolleyballResult");
7
+ /**
8
+ * Simulación de un partido de volleyball sobre el template method de A_MatchPlay.
9
+ *
10
+ * REGULAR: se juegan sets al mejor de 5 (primero a 3 sets gana el partido).
11
+ * Sets 1-4 a 25 (diferencia ≥ 2); set 5 a 15 (diferencia ≥ 2).
12
+ * TIEBREAK: sólo en el segundo partido de una serie h&a que quedó 1-1 en partidos.
13
+ * Se juega un golden set único a 15 (diferencia ≥ 2), registrado en
14
+ * `extraSetPoints`, que define la serie.
15
+ *
16
+ * No hay empate natural: siempre hay ganador del partido.
17
+ */
18
+ class VolleyballMatchPlay extends jl_sprt_core_1.A_MatchPlay {
19
+ constructor(contextProvider) {
20
+ super(contextProvider);
21
+ this._currentSetPointsOne = 0;
22
+ this._currentSetPointsTwo = 0;
23
+ this._breakLeft = 0;
24
+ /** Puntos del golden set en curso (fase de desempate). */
25
+ this._goldenPointsOne = 0;
26
+ this._goldenPointsTwo = 0;
27
+ this._goldenResolved = false;
28
+ }
29
+ startPlay(one, two) {
30
+ this._result = new VolleyballResult_1.VolleyballResult(one.id, two.id);
31
+ this._currentSetPointsOne = 0;
32
+ this._currentSetPointsTwo = 0;
33
+ this._breakLeft = 0;
34
+ this._goldenPointsOne = 0;
35
+ this._goldenPointsTwo = 0;
36
+ this._goldenResolved = false;
37
+ }
38
+ // --- tiempo regular: sets hasta 3 -----------------------------------------
39
+ regularTimeIsOver() {
40
+ const r = this._result;
41
+ const s1 = r.getScore(this._teamOne.id).setsWon;
42
+ const s2 = r.getScore(this._teamTwo.id).setsWon;
43
+ return s1 >= 3 || s2 >= 3;
44
+ }
45
+ playRegularInterval() {
46
+ this._time++;
47
+ if (this._breakLeft > 0) {
48
+ this._breakLeft--;
49
+ return;
50
+ }
51
+ for (let i = 0; i < VolleyballMatchPlay.RALLIES_PER_INTERVAL; i++) {
52
+ const setClosed = this.playSetRally();
53
+ if (setClosed) {
54
+ // Si el partido no terminó, descanso entre sets.
55
+ if (!this.regularTimeIsOver()) {
56
+ this._breakLeft = VolleyballMatchPlay.SET_BREAK_INTERVALS;
57
+ }
58
+ break;
59
+ }
60
+ }
61
+ }
62
+ /** Juega un rally del set normal; devuelve true si cerró el set. */
63
+ playSetRally() {
64
+ const r = this._result;
65
+ const s1 = r.getScore(this._teamOne.id).setsWon;
66
+ const s2 = r.getScore(this._teamTwo.id).setsWon;
67
+ const target = (s1 + s2) === 4 ? 15 : 25; // 5º set a 15
68
+ if ((0, randomSource_1.randomFloat)() < 0.52)
69
+ this._currentSetPointsOne++;
70
+ else
71
+ this._currentSetPointsTwo++;
72
+ const p1 = this._currentSetPointsOne;
73
+ const p2 = this._currentSetPointsTwo;
74
+ if ((p1 >= target || p2 >= target) && Math.abs(p1 - p2) >= 2) {
75
+ const winner = p1 > p2 ? this._teamOne.id : this._teamTwo.id;
76
+ r.addScore(winner, {
77
+ type: 'set',
78
+ winnerPoints: Math.max(p1, p2),
79
+ loserPoints: Math.min(p1, p2),
80
+ });
81
+ this._currentSetPointsOne = 0;
82
+ this._currentSetPointsTwo = 0;
83
+ return true;
84
+ }
85
+ return false;
86
+ }
87
+ // --- fase de desempate: golden set a 15 -----------------------------------
88
+ playTieBreakInterval() {
89
+ const r = this._result;
90
+ for (let i = 0; i < VolleyballMatchPlay.RALLIES_PER_INTERVAL; i++) {
91
+ if ((0, randomSource_1.randomFloat)() < 0.52)
92
+ this._goldenPointsOne++;
93
+ else
94
+ this._goldenPointsTwo++;
95
+ const p1 = this._goldenPointsOne;
96
+ const p2 = this._goldenPointsTwo;
97
+ if ((p1 >= 15 || p2 >= 15) && Math.abs(p1 - p2) >= 2) {
98
+ const winner = p1 > p2 ? this._teamOne.id : this._teamTwo.id;
99
+ r.addScore(winner, {
100
+ type: 'extraSet',
101
+ winnerPoints: Math.max(p1, p2),
102
+ loserPoints: Math.min(p1, p2),
103
+ });
104
+ this._goldenResolved = true;
105
+ return;
106
+ }
107
+ }
108
+ }
109
+ tieBreakIsResolved() {
110
+ return this._goldenResolved;
111
+ }
112
+ }
113
+ exports.VolleyballMatchPlay = VolleyballMatchPlay;
114
+ /** Rallies que se juegan por intervalo. */
115
+ VolleyballMatchPlay.RALLIES_PER_INTERVAL = 9;
116
+ /** Descanso entre sets (intervalos). */
117
+ VolleyballMatchPlay.SET_BREAK_INTERVALS = 1;
118
+ //# sourceMappingURL=VolleyballMatchPlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VolleyballMatchPlay.js","sourceRoot":"","sources":["../../../src/engines/volleyball/VolleyballMatchPlay.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGjE,qDAAiD;AACjD,iFAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAa,mBAAoB,SAAQ,0BAA+C;IAgBtF,YAAY,eAAwD;QAClE,KAAK,CAAC,eAAe,CAAC,CAAC;QAVjB,yBAAoB,GAAG,CAAC,CAAC;QACzB,yBAAoB,GAAG,CAAC,CAAC;QACzB,eAAU,GAAG,CAAC,CAAC;QAEvB,0DAA0D;QAClD,qBAAgB,GAAG,CAAC,CAAC;QACrB,qBAAgB,GAAG,CAAC,CAAC;QACrB,oBAAe,GAAG,KAAK,CAAC;IAIhC,CAAC;IAES,SAAS,CAAC,GAAqB,EAAE,GAAqB;QAC9D,IAAI,CAAC,OAAO,GAAG,IAAI,mCAAgB,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,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dist/index.d.ts CHANGED
@@ -2,21 +2,21 @@ export { AmericanFootballProfile } from './profiles/americanFootball/AmericanFoo
2
2
  export { FootballProfile } from './profiles/football/FootballProfile';
3
3
  export { VolleyballProfile } from './profiles/volleyball/VolleyballProfile';
4
4
  export { AmericanFootballMatch } from './profiles/americanFootball/AmericanFootballMatch';
5
- export { AmericanFootballMatchPlay } from './profiles/americanFootball/AmericanFootballMatchPlay';
5
+ export { AmericanFootballMatchPlay } from './engines/americanFootball/AmericanFootballMatchPlay';
6
6
  export { AmericanFootballResult } from './profiles/americanFootball/AmericanFootballResult';
7
7
  export { AmericanFootballTeam } from './profiles/americanFootball/AmericanFootballTeam';
8
8
  export { AmericanFootballSerie } from './profiles/americanFootball/AmericanFootballSerie';
9
9
  export { AmericanFootballTeamTableItem } from './profiles/americanFootball/AmericanFootballTeamTableItem';
10
10
  export type { AmericanFootballMatchResults, AmericanFootballMatchPuntuations, IAmericanFootballTeamTableItem } from './profiles/americanFootball/AmericanFootballTeamTableItem';
11
11
  export { FootballMatch } from './profiles/football/FootballMatch';
12
- export { FootballMatchPlay } from './profiles/football/FootballMatchPlay';
12
+ export { FootballMatchPlay } from './engines/football/FootballMatchPlay';
13
13
  export { FootballResult } from './profiles/football/FootballResult';
14
14
  export { FootballTeam } from './profiles/football/FootballTeam';
15
15
  export { FootballSerie } from './profiles/football/FootballSerie';
16
16
  export { FootballTeamTableItem } from './profiles/football/FootballTeamTableItem';
17
17
  export type { FootballMatchResults, FootballMatchPuntuations, IFootballTeamTableItem } from './profiles/football/FootballTeamTableItem';
18
18
  export { VolleyballMatch } from './profiles/volleyball/VolleyballMatch';
19
- export { VolleyballMatchPlay } from './profiles/volleyball/VolleyballMatchPlay';
19
+ export { VolleyballMatchPlay } from './engines/volleyball/VolleyballMatchPlay';
20
20
  export { VolleyballResult } from './profiles/volleyball/VolleyballResult';
21
21
  export { VolleyballTeam } from './profiles/volleyball/VolleyballTeam';
22
22
  export { VolleyballSerie } from './profiles/volleyball/VolleyballSerie';
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ var VolleyballProfile_1 = require("./profiles/volleyball/VolleyballProfile");
10
10
  Object.defineProperty(exports, "VolleyballProfile", { enumerable: true, get: function () { return VolleyballProfile_1.VolleyballProfile; } });
11
11
  var AmericanFootballMatch_1 = require("./profiles/americanFootball/AmericanFootballMatch");
12
12
  Object.defineProperty(exports, "AmericanFootballMatch", { enumerable: true, get: function () { return AmericanFootballMatch_1.AmericanFootballMatch; } });
13
- var AmericanFootballMatchPlay_1 = require("./profiles/americanFootball/AmericanFootballMatchPlay");
13
+ var AmericanFootballMatchPlay_1 = require("./engines/americanFootball/AmericanFootballMatchPlay");
14
14
  Object.defineProperty(exports, "AmericanFootballMatchPlay", { enumerable: true, get: function () { return AmericanFootballMatchPlay_1.AmericanFootballMatchPlay; } });
15
15
  var AmericanFootballResult_1 = require("./profiles/americanFootball/AmericanFootballResult");
16
16
  Object.defineProperty(exports, "AmericanFootballResult", { enumerable: true, get: function () { return AmericanFootballResult_1.AmericanFootballResult; } });
@@ -22,7 +22,7 @@ var AmericanFootballTeamTableItem_1 = require("./profiles/americanFootball/Ameri
22
22
  Object.defineProperty(exports, "AmericanFootballTeamTableItem", { enumerable: true, get: function () { return AmericanFootballTeamTableItem_1.AmericanFootballTeamTableItem; } });
23
23
  var FootballMatch_1 = require("./profiles/football/FootballMatch");
24
24
  Object.defineProperty(exports, "FootballMatch", { enumerable: true, get: function () { return FootballMatch_1.FootballMatch; } });
25
- var FootballMatchPlay_1 = require("./profiles/football/FootballMatchPlay");
25
+ var FootballMatchPlay_1 = require("./engines/football/FootballMatchPlay");
26
26
  Object.defineProperty(exports, "FootballMatchPlay", { enumerable: true, get: function () { return FootballMatchPlay_1.FootballMatchPlay; } });
27
27
  var FootballResult_1 = require("./profiles/football/FootballResult");
28
28
  Object.defineProperty(exports, "FootballResult", { enumerable: true, get: function () { return FootballResult_1.FootballResult; } });
@@ -34,7 +34,7 @@ var FootballTeamTableItem_1 = require("./profiles/football/FootballTeamTableItem
34
34
  Object.defineProperty(exports, "FootballTeamTableItem", { enumerable: true, get: function () { return FootballTeamTableItem_1.FootballTeamTableItem; } });
35
35
  var VolleyballMatch_1 = require("./profiles/volleyball/VolleyballMatch");
36
36
  Object.defineProperty(exports, "VolleyballMatch", { enumerable: true, get: function () { return VolleyballMatch_1.VolleyballMatch; } });
37
- var VolleyballMatchPlay_1 = require("./profiles/volleyball/VolleyballMatchPlay");
37
+ var VolleyballMatchPlay_1 = require("./engines/volleyball/VolleyballMatchPlay");
38
38
  Object.defineProperty(exports, "VolleyballMatchPlay", { enumerable: true, get: function () { return VolleyballMatchPlay_1.VolleyballMatchPlay; } });
39
39
  var VolleyballResult_1 = require("./profiles/volleyball/VolleyballResult");
40
40
  Object.defineProperty(exports, "VolleyballResult", { enumerable: true, get: function () { return VolleyballResult_1.VolleyballResult; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,+FAA8F;AAArF,kIAAA,uBAAuB,OAAA;AAChC,uEAAsE;AAA7D,kHAAA,eAAe,OAAA;AACxB,6EAA4E;AAAnE,sHAAA,iBAAiB,OAAA;AAE1B,2FAA0F;AAAjF,8HAAA,qBAAqB,OAAA;AAC9B,mGAAkG;AAAzF,sIAAA,yBAAyB,OAAA;AAClC,6FAA4F;AAAnF,gIAAA,sBAAsB,OAAA;AAC/B,yFAAwF;AAA/E,4HAAA,oBAAoB,OAAA;AAC7B,2FAA0F;AAAjF,8HAAA,qBAAqB,OAAA;AAC9B,2GAA0G;AAAjG,8IAAA,6BAA6B,OAAA;AAGtC,mEAAkE;AAAzD,8GAAA,aAAa,OAAA;AACtB,2EAA0E;AAAjE,sHAAA,iBAAiB,OAAA;AAC1B,qEAAoE;AAA3D,gHAAA,cAAc,OAAA;AACvB,iEAAgE;AAAvD,4GAAA,YAAY,OAAA;AACrB,mEAAkE;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AA/D,kHAAA,eAAe,OAAA;AACxB,gFAA+E;AAAtE,0HAAA,mBAAmB,OAAA;AAC5B,2EAA0E;AAAjE,oHAAA,gBAAgB,OAAA;AACzB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,yEAAwE;AAA/D,kHAAA,eAAe,OAAA;AACxB,yFAAwF;AAA/E,kIAAA,uBAAuB,OAAA;AAGhC,+CAA2D;AAAlD,2GAAA,WAAW,OAAA;AAAE,4GAAA,YAAY,OAAA;AAElC,6BAA6B;AAC7B,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AmericanFootballMatch = void 0;
4
4
  const jl_sprt_core_1 = require("jl-sprt-core");
5
- const AmericanFootballMatchPlay_1 = require("./AmericanFootballMatchPlay");
5
+ const AmericanFootballMatchPlay_1 = require("../../engines/americanFootball/AmericanFootballMatchPlay");
6
6
  const getPlaying = (contextProvider) => {
7
7
  return new AmericanFootballMatchPlay_1.AmericanFootballMatchPlay(contextProvider);
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AmericanFootballMatch.js","sourceRoot":"","sources":["../../../src/profiles/americanFootball/AmericanFootballMatch.ts"],"names":[],"mappings":";;;AACA,+CAAiF;AAKjF,2EAAwE;AAKxE,MAAM,UAAU,GAAG,CAAC,eAA8D,EAAE,EAAE;IACpF,OAAO,IAAI,qDAAyB,CAAC,eAAe,CAAC,CAAC;AACxD,CAAC,CAAA;AACD;;;;;GAKG;AACH,MAAa,qBAAsB,SAAQ,sBAAuD;IAChG,YAAY,IAAwC;QAClD,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACzB,CAAC;CACF;AAJD,sDAIC"}
1
+ {"version":3,"file":"AmericanFootballMatch.js","sourceRoot":"","sources":["../../../src/profiles/americanFootball/AmericanFootballMatch.ts"],"names":[],"mappings":";;;AACA,+CAAiF;AAKjF,wGAAqG;AAKrG,MAAM,UAAU,GAAG,CAAC,eAA8D,EAAE,EAAE;IACpF,OAAO,IAAI,qDAAyB,CAAC,eAAe,CAAC,CAAC;AACxD,CAAC,CAAA;AACD;;;;;GAKG;AACH,MAAa,qBAAsB,SAAQ,sBAAuD;IAChG,YAAY,IAAwC;QAClD,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACzB,CAAC;CACF;AAJD,sDAIC"}
@@ -3,6 +3,7 @@ import { IAmericanFootballScore } from '../../scores';
3
3
  import { AmericanFootballTeam } from './AmericanFootballTeam';
4
4
  import { AmericanFootballRoster } from './AmericanFootballRoster';
5
5
  import { AmericanFootballResult } from "./AmericanFootballResult";
6
+ import { AmericanFootballMatchPlay } from "../../engines/americanFootball/AmericanFootballMatchPlay";
6
7
  import { AmericanFootballMatch } from "./AmericanFootballMatch";
7
8
  import { AmericanFootballSerie } from "./AmericanFootballSerie";
8
9
  import { AmericanFootballTeamTableItem, AmericanFootballMatchResults, AmericanFootballMatchPuntuations } from "./AmericanFootballTeamTableItem";
@@ -17,6 +18,7 @@ export declare class AmericanFootballProfile implements ISportProfile<IAmericanF
17
18
  createSerie(info: ISerieCreationInfo<AmericanFootballRoster>): AmericanFootballSerie;
18
19
  createTeam(creator: ITeamCreator): AmericanFootballTeam;
19
20
  createResult(teamOneId: string, teamTwoId: string): AmericanFootballResult;
21
+ createMatchPlay(globalResult?: AmericanFootballResult): AmericanFootballMatchPlay;
20
22
  createTableItem(team: AmericanFootballTeam, bsId: string): AmericanFootballTeamTableItem;
21
23
  updateTableFromResult(tti: AmericanFootballTeamTableItem, resultInfo: IResultInfo<IAmericanFootballScore>): void;
22
24
  }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AmericanFootballProfile = void 0;
4
4
  const AmericanFootballTeam_1 = require("./AmericanFootballTeam");
5
- const AmericanFootballResult_1 = require("./AmericanFootballResult");
6
5
  const AmericanFootballMatch_1 = require("./AmericanFootballMatch");
7
6
  const AmericanFootballSerie_1 = require("./AmericanFootballSerie");
8
7
  const AmericanFootballTeamTableItem_1 = require("./AmericanFootballTeamTableItem");
@@ -23,7 +22,10 @@ class AmericanFootballProfile {
23
22
  return new AmericanFootballTeam_1.AmericanFootballTeam(creator);
24
23
  }
25
24
  createResult(teamOneId, teamTwoId) {
26
- return new AmericanFootballResult_1.AmericanFootballResult(teamOneId, teamTwoId);
25
+ throw new Error(`no hace falta implementar esto, el propio Match crea sus MatchPlay`);
26
+ }
27
+ createMatchPlay(globalResult) {
28
+ throw new Error(`no hace falta implementar esto, el propio Match crea sus MatchPlay`);
27
29
  }
28
30
  createTableItem(team, bsId) {
29
31
  return new AmericanFootballTeamTableItem_1.AmericanFootballTeamTableItem(team, bsId);
@@ -1 +1 @@
1
- {"version":3,"file":"AmericanFootballProfile.js","sourceRoot":"","sources":["../../../src/profiles/americanFootball/AmericanFootballProfile.ts"],"names":[],"mappings":";;;AAGA,iEAA8D;AAE9D,qEAAkE;AAElE,mEAAgE;AAChE,mEAAgE;AAChE,mFAAgJ;AAEhJ;;;;;GAKG;AACH,MAAa,uBAAuB;IAElC,WAAW,CAAC,IAAwE;QAClF,OAAO,IAAI,6CAAqB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,WAAW,CAAC,IAAgD;QAC1D,OAAO,IAAI,6CAAqB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,UAAU,CAAC,OAAqB;QAC9B,OAAO,IAAI,2CAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,YAAY,CAAC,SAAiB,EAAE,SAAiB;QAC/C,OAAO,IAAI,+CAAsB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC1D,CAAC;IAED,eAAe,CAAC,IAA0B,EAAE,IAAY;QACtD,OAAO,IAAI,6DAA6B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,qBAAqB,CAAC,GAAkC,EAAE,UAA+C;QACvG,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,KAAK,GAAG,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM;YACpB,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,KAAK;YAC/B,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC;QAClC,MAAM,UAAU,GAAG,MAAM;YACvB,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,KAAK;YAC/B,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC;QAElC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/B,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAElC,IAAI,UAAU,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;YAClC,GAAG,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;aAAM,IAAI,UAAU,CAAC,SAAS,KAAK,GAAG,EAAE,CAAC;YACxC,GAAG,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA3CD,0DA2CC"}
1
+ {"version":3,"file":"AmericanFootballProfile.js","sourceRoot":"","sources":["../../../src/profiles/americanFootball/AmericanFootballProfile.ts"],"names":[],"mappings":";;;AAGA,iEAA8D;AAI9D,mEAAgE;AAChE,mEAAgE;AAChE,mFAAgJ;AAEhJ;;;;;GAKG;AACH,MAAa,uBAAuB;IAElC,WAAW,CAAC,IAAwE;QAClF,OAAO,IAAI,6CAAqB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,WAAW,CAAC,IAAgD;QAC1D,OAAO,IAAI,6CAAqB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,UAAU,CAAC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,6 +9,12 @@ export declare class AmericanFootballResult extends A_Result<IAmericanFootballSc
9
9
  constructor(one: string, two: string);
10
10
  addScore(id: string, update: AmericanFootballScoreUpdate): void;
11
11
  getScore(id: string): IAmericanFootballScore;
12
+ /**
13
+ * Aporte al agregado de la serie: puntos totales. El overtime (fase de
14
+ * desempate) los sigue sumando, de modo que un empate del agregado se rompe con
15
+ * los puntos anotados en el alargue.
16
+ */
17
+ aggregateValue(teamId: string): number;
12
18
  getResultInfo(): IResultInfo<IAmericanFootballScore>;
13
19
  getWinnerInfo(): IWinnerInfo;
14
20
  }