feat(dashboard): add matchNumber to track games played per session
Some checks failed
CI/CD - Francia Ocupada (La Resistencia) / build-and-deploy (push) Failing after 7s

This commit is contained in:
Resistencia Dev
2025-12-22 23:24:07 +01:00
parent c4c08c64c3
commit 904bd80bd5
4 changed files with 7 additions and 3 deletions

View File

@@ -91,6 +91,7 @@ const getAdminData = async () => {
currentPlayers: g.state.players.length,
maxPlayers: g.maxPlayers,
currentRound: g.state.currentRound,
matchNumber: g.state.matchNumber,
players: g.state.players.map(p => ({ id: p.id, name: p.name }))
}));

View File

@@ -43,7 +43,8 @@ export class Game {
missionHistory: [],
revealedVotes: [],
history: [],
hostId: hostId
hostId: hostId,
matchNumber: 1
};
}
@@ -369,7 +370,8 @@ export class Game {
restartGame() {
this.log('=== REINICIANDO PARTIDA ===');
// Resetear variables de juego
// Incrementar contador de partidas y resetear variables de juego
this.state.matchNumber++;
this.state.currentRound = 1;
this.state.failedVotesCount = 0;
this.state.questResults = [null, null, null, null, null];