🎉 Changement complet de la structure -> Source + Documentation, et identification et mdp fonctionnels

pull/32/head
Nicolas BLONDEAU 2 years ago
parent 99b0dcac13
commit 0b63f1c9f2

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -2,6 +2,7 @@
using Modèle;
using System;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.PortableExecutable;
///Déclaration du STUB
@ -114,41 +115,49 @@ int menuConnexion()
{
string? id;
string? psswd;
int ret = 0;
while ( ret != 0 )
{
Console.WriteLine("Identifiant : ");
id = Console.ReadLine();
if (!string.IsNullOrEmpty(id))
{
ret = 1;
Console.Clear();
} else
{
ret = 0;
}
}
Console.WriteLine("Mot de passe : ");
psswd = ReadPassword();
int i = 1;
int nbRetries = 0;
int exists = ub.checkIfExists(id, psswd);
nbRetries++;
int exists = 0;
while (exists == 0)
{
if(nbRetries >= 3)
if (nbRetries >= 3)
{
return -1;
}
Console.Clear();
Console.WriteLine("Erreur, identifiant ou mot de passe incorrect.");
Console.WriteLine("");
Console.WriteLine("Identifiant : ");
Console.Write($"Essai n°{i} Identifiant : ");
id = Console.ReadLine();
Console.WriteLine("Mot de passe : ");
i++;
if (id != null)
id = id.Trim();
while (string.IsNullOrEmpty(id))
{
if (i > 3)
{
Console.Clear();
Console.WriteLine("Trop d'erreurs. Réessayez plus tard.");
return -2;
}
Console.Clear();
Console.Write($"Essai n°{i} Identifiant : ");
id = Console.ReadLine();
if (id != null)
id = id.Trim();
i++;
}
Console.Write("Mot de passe : ");
psswd = ReadPassword();
if (string.IsNullOrEmpty(psswd))
{
continue;
}
exists = ub.checkIfExists(id, psswd);
nbRetries++;
if ( exists == 0)
{
Console.WriteLine("Erreur, identifiant ou mot de passe incorrect.");
}
}
monsterPage();
return 0;

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -21,6 +21,7 @@ namespace Modèle
lu.Add(new User("Moi", "Monchanin", "Liam", "feur", new List<Monstre> { }));
lu.Add(new User("Nikoala", "Blondeau", "Nicolas", "niblondeau", new List<Monstre> { }));
lu.Add(new User("Yadoumir", "Doumir", "Yannis", "mdp", new List<Monstre> { }));
lu.Add(new User("osuplayer123", "Bonetti", "Martin", "oSu!727", new List<Monstre> { }));
return lu;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save