refactor(striscia): compatta struttura dati da array a stringa
Sostituisce r: ['home','guest',...] con ris: 'hg...' e i valori serv 'home'/'guest' con 'h'/'g'. Nessun cambiamento funzionale.
This commit is contained in:
@@ -224,7 +224,7 @@ export default {
|
||||
visuStriscia: true,
|
||||
modalitaPartita: "3/5",
|
||||
sp: {
|
||||
striscia: [{ serv: 'home', r: [] }],
|
||||
striscia: [{ serv: 'h', ris: '' }],
|
||||
servHome: true,
|
||||
punt: { home: 0, guest: 0 },
|
||||
set: { home: 0, guest: 0 },
|
||||
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
visuStriscia: true,
|
||||
modalitaPartita: "3/5",
|
||||
sp: {
|
||||
striscia: [{ serv: 'home', r: [] }],
|
||||
striscia: [{ serv: 'h', ris: '' }],
|
||||
servHome: true,
|
||||
punt: { home: 0, guest: 0 },
|
||||
set: { home: 0, guest: 0 },
|
||||
@@ -197,8 +197,8 @@ export default {
|
||||
if (!currentSet) return { home: [], guest: [] }
|
||||
let h = 0, g = 0
|
||||
const home = [], guest = []
|
||||
for (const scorer of currentSet.r) {
|
||||
if (scorer === 'home') { h++; home.push(h); guest.push(' ') }
|
||||
for (const scorer of currentSet.ris) {
|
||||
if (scorer === 'h') { h++; home.push(h); guest.push(' ') }
|
||||
else { g++; guest.push(g); home.push(' ') }
|
||||
}
|
||||
return { home, guest }
|
||||
|
||||
Reference in New Issue
Block a user