47 lines
761 B
C#
47 lines
761 B
C#
using MiniJeuxFinal.GameFactory;
|
|
using MiniJeuxFinal.Ui;
|
|
using MiniJeuxFinal.Wrappers;
|
|
|
|
class Program()
|
|
{
|
|
public static void Main()
|
|
{
|
|
var consoleService = new ConsoleService();
|
|
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..];
|
|
}
|
|
}
|