diff --git a/client/src/app/dashboard/page.tsx b/client/src/app/dashboard/page.tsx
index d985b99..301f613 100644
--- a/client/src/app/dashboard/page.tsx
+++ b/client/src/app/dashboard/page.tsx
@@ -252,7 +252,7 @@ export default function Dashboard() {
{game.currentRound > 0 && (
- Ronda {game.currentRound}
+ {game.matchNumber > 1 ? `P${game.matchNumber} - R${game.currentRound}` : `Ronda ${game.currentRound}`}
)}
{
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 }))
}));
diff --git a/server/src/models/Game.ts b/server/src/models/Game.ts
index afed129..719b973 100644
--- a/server/src/models/Game.ts
+++ b/server/src/models/Game.ts
@@ -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];
diff --git a/shared/types.ts b/shared/types.ts
index 257b1d6..84041ce 100644
--- a/shared/types.ts
+++ b/shared/types.ts
@@ -89,6 +89,7 @@ export interface GameState {
winner?: Faction;
history: string[]; // Log de acciones para mostrar en pantalla
+ matchNumber: number; // Número de partida en esta operación (se incrementa con cada restart)
}
// Configuración de jugadores por partida (según tus reglas)