mirror of
https://framagit.org/JonathanMM/sutom.git
synced 2024-05-18 21:56:37 +02:00
Fix #5: Amélioration du message d'erreur si le mot proposé ne commence pas par la bonne lettre
This commit is contained in:
parent
ed7ba949d9
commit
e9dedff604
|
@ -79,8 +79,12 @@ export default class Gestionnaire {
|
||||||
public verifierMot(mot: string, skipAnimation: boolean = false): void {
|
public verifierMot(mot: string, skipAnimation: boolean = false): void {
|
||||||
mot = this._dictionnaire.nettoyerMot(mot);
|
mot = this._dictionnaire.nettoyerMot(mot);
|
||||||
//console.debug(mot + " => " + (this._dictionnaire.estMotValide(mot) ? "Oui" : "non"));
|
//console.debug(mot + " => " + (this._dictionnaire.estMotValide(mot) ? "Oui" : "non"));
|
||||||
if (mot[0] !== this._motATrouver[0] || !this._dictionnaire.estMotValide(mot)) {
|
if (mot[0] !== this._motATrouver[0]) {
|
||||||
NotificationMessage.ajouterNotification("Ce mot n'est pas valide");
|
NotificationMessage.ajouterNotification("Le mot proposé doit commencer par la même lettre que le mot recherché");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this._dictionnaire.estMotValide(mot)) {
|
||||||
|
NotificationMessage.ajouterNotification("Ce mot n'est pas dans notre dictionnaire");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this._datePartieEnCours) this._datePartieEnCours = new Date();
|
if (!this._datePartieEnCours) this._datePartieEnCours = new Date();
|
||||||
|
|
Loading…
Reference in a new issue