using MiniJeuxFinal.Games; using MiniJeuxFinal.Games.PierrePapierCiseaux; using MiniJeuxFinal.Games.PierrePapierCiseaux.Actions; using MiniJeuxFinal.Games.PierrePapierCiseaux.Factories; using MiniJeuxFinal.Games.PierrePapierCiseaux.Players; using MiniJeuxFinal.Wrappers; namespace MiniJeuxFinal.GameFactory { public static class PierrePapierCiseauxGameFactory { public static PierrePapierCiseauxGame CreateGame(IConsole consoleService) { consoleService.WriteLine("Entrer votre nom de joueur:"); var userName = consoleService.ReadLine(); consoleService.WriteLine("Entrer le nombre de round:"); var roundNumber = consoleService.ReadLine(); var player = new PlayerPpc(userName, new InputActionFactory(new ConsoleService())); var computer = new PlayerPpc("Ordi", new RandomActionFactory()); IAction[] lstActions = [new StoneAction(), new PaperAction(), new ScissorsAction()]; player.AddAction(lstActions); computer.AddAction(lstActions); return new PierrePapierCiseauxGame(int.Parse(roundNumber), player, computer); } } }