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
Some checks failed
CI/CD - Francia Ocupada (La Resistencia) / build-and-deploy (push) Failing after 7s
This commit is contained in:
@@ -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 }))
|
||||
}));
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user