Formazione Home
diff --git a/src/components/HomePage/HomePage.js b/src/components/HomePage/HomePage.js
index 5ebbe12..577d935 100644
--- a/src/components/HomePage/HomePage.js
+++ b/src/components/HomePage/HomePage.js
@@ -14,6 +14,7 @@ export default {
visuForm: false,
visuButt: true,
visuStriscia: true,
+ modalitaPartita: "3/5", // "2/3" o "3/5"
sp: {
striscia: { home: [0], guest: [0] },
servHome: true,
@@ -126,8 +127,16 @@ export default {
const setGuest = this.sp.set.guest;
const totSet = setHome + setGuest;
- // Determina se siamo nel set decisivo (5° set)
- const isSetDecisivo = totSet >= 4;
+ // Determina se siamo nel set decisivo in base alla modalità partita
+ let isSetDecisivo = false;
+ if (this.modalitaPartita === "2/3") {
+ // Tie-break al 3° set (quando totSet >= 2)
+ isSetDecisivo = totSet >= 2;
+ } else {
+ // Tie-break al 5° set (quando totSet >= 4)
+ isSetDecisivo = totSet >= 4;
+ }
+
const punteggioVittoria = isSetDecisivo ? 15 : 25;
// Vittoria con punteggio >= 25 (o 15 per set decisivo) e almeno 2 punti di vantaggio