Correction d'un mauvais affichage du numéro de la grille

This commit is contained in:
JonathanMM 2022-03-27 23:56:43 +02:00
parent 4d1033223f
commit ca2f3fcfcd
1 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,8 @@ export default class FinDePartiePanel {
private _partieEstFinie: boolean = false;
public constructor(datePartie: Date, panelManager: PanelManager) {
this._datePartie = datePartie;
this._datePartie = new Date(datePartie);
this._datePartie.setHours(0, 0, 0);
this._panelManager = panelManager;
this._statsButton = document.getElementById("configuration-stats-bouton") as HTMLElement;
@ -66,7 +67,7 @@ export default class FinDePartiePanel {
this._estVictoire = estBonneReponse;
this._partieEstFinie = true;
let numeroGrille = Math.floor((dateGrille - origine) / (24 * 3600 * 1000)) + 1;
let numeroGrille = Math.round((dateGrille - origine) / (24 * 3600 * 1000)) + 1;
let afficherChrono = (Sauvegardeur.chargerConfig() ?? Configuration.Default).afficherChrono;