correction

This commit is contained in:
Grizouille
2025-12-20 18:20:17 +01:00
parent 9eb0314f0c
commit 8d961eb6ab
2 changed files with 85 additions and 53 deletions

View File

@@ -10,5 +10,37 @@ class Program()
var game = PierrePapierCiseauxGameFactory.CreateGame(consoleService);
var runner = new GameRunnerConsole(consoleService, game);
runner.Run();
}
var personne = new Personne("toto");
personne.ShowName();
}
}
public class Personne
{
public Personne(string name)
{
Name = name;
}
public string Name { get; }
public string GetFirstLetter()
{
return Name.FirstOrDefault().ToString();
}
public void ShowName()
{
Console.WriteLine("Votre nom est: " + Plop());
}
private string Plop()
{
return Name[0].ToString().ToUpper() + Name[1..];
}
}