mirror of
https://framagit.org/JonathanMM/sutom.git
synced 2024-05-05 23:43:36 +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 {
|
||||
mot = this._dictionnaire.nettoyerMot(mot);
|
||||
//console.debug(mot + " => " + (this._dictionnaire.estMotValide(mot) ? "Oui" : "non"));
|
||||
if (mot[0] !== this._motATrouver[0] || !this._dictionnaire.estMotValide(mot)) {
|
||||
NotificationMessage.ajouterNotification("Ce mot n'est pas valide");
|
||||
if (mot[0] !== this._motATrouver[0]) {
|
||||
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;
|
||||
}
|
||||
if (!this._datePartieEnCours) this._datePartieEnCours = new Date();
|
||||
|
|
Loading…
Reference in a new issue