diff --git a/fichier1/fichier1/Controllers/GameController.cs b/fichier1/fichier1/Controllers/GameController.cs index 6f34d9607c10e88aee5735c30e24d916fd209ef0..c11a3247df8bebe2ab984ebc505a13b1edbd2037 100644 --- a/fichier1/fichier1/Controllers/GameController.cs +++ b/fichier1/fichier1/Controllers/GameController.cs @@ -4,7 +4,74 @@ using System.Text; namespace fichier1.Controllers { - class GameController + + + public class GameController : IGameController { + public GameController() + { + + } + + /// <summary> + /// Recupere le mot suivant a decouper + /// </summary> + /// <returns>Un tableau contenant un string, representant un string pret a etre decoupe</returns> + public string[] getMotSuivant() + { + // TODO: implement + return null; + } + + /// <summary> + /// Valide le mot et l'envoie au model + /// </summary> + /// <param name="mot"></param> + public void validerMot(string[] mot) + { + // TODO: implement + } + + /// <summary> + /// Recupere un mot decoupe auparavant + /// </summary> + /// <param name="nb">numero du mot a recuperer</param> + /// <returns>un tableau de string des morceaux de mot decoupes</returns> + public string[] getMot(int nb) + { + // TODO: implement + return null; + } + + /// <summary> + /// Recupe la correction d'un mot + /// </summary> + /// <param name="nb">numero du mot corrige a recuperer</param> + /// <returns>un tableau de string des morceaux de mot decoupes</returns> + public string[] getCorrection(int nb) + { + // TODO: implement + return null; + } + + /// <summary> + /// Recupere le numero du mot courrant pendant la partie + /// </summary> + /// <returns>numero du mot</returns> + public int getCurrentWordNumber() + { + // TODO: implement + return 0; + } + + /// <summary> + /// Recupere le nombre total de mots dans la partie + /// </summary> + /// <returns>nombre total de mots</returns> + public int getTotalWordNumber() + { + // TODO: implement + return 0; + } } } diff --git a/fichier1/fichier1/Controllers/IGameController.cs b/fichier1/fichier1/Controllers/IGameController.cs new file mode 100644 index 0000000000000000000000000000000000000000..5aac7b79134dabb1a726212ebb856f06bc1b6d0b --- /dev/null +++ b/fichier1/fichier1/Controllers/IGameController.cs @@ -0,0 +1,12 @@ +namespace fichier1.Controllers +{ + public interface IGameController + { + string[] getCorrection(int nb); + int getCurrentWordNumber(); + string[] getMot(int nb); + string[] getMotSuivant(); + int getTotalWordNumber(); + void validerMot(string[] mot); + } +} \ No newline at end of file diff --git a/fichier1/fichier1/IService.cs b/fichier1/fichier1/IService.cs deleted file mode 100644 index ecc92179e030f1872d9f66a0acd635a583fbd863..0000000000000000000000000000000000000000 --- a/fichier1/fichier1/IService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using fichier1.Data; -using System.Collections.Generic; - -namespace fichier1 -{ - public interface IService - { - } - -} \ No newline at end of file diff --git a/fichier1/fichier1/Program.cs b/fichier1/fichier1/Program.cs index 6246c82ab3bed039e45e72c70ebf7bfb80596e9f..65b843a5756ab374944070f2cef052cc8a9f1aae 100644 --- a/fichier1/fichier1/Program.cs +++ b/fichier1/fichier1/Program.cs @@ -9,6 +9,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; +using fichier1.Controllers; namespace fichier1 { @@ -33,7 +34,7 @@ namespace fichier1 Application.SetCompatibleTextRenderingDefault(false); //serviceCollection.AddSingleton<Form1>(); - serviceCollection.AddScoped<IService, Service>(); + serviceCollection.AddScoped<IGameController, GameController>(); ServiceProvider = serviceCollection.BuildServiceProvider(); ServiceProvider.GetRequiredService<BddContext>().Database.EnsureCreated(); diff --git a/fichier1/fichier1/Service.cs b/fichier1/fichier1/Service.cs deleted file mode 100644 index b3c8e86718ed9ffe20b4fdf6661ff9a2f681e93f..0000000000000000000000000000000000000000 --- a/fichier1/fichier1/Service.cs +++ /dev/null @@ -1,18 +0,0 @@ -using fichier1.Data; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace fichier1 -{ - public class Service : IService - { - private readonly BddContext context; - - public Service(BddContext context) - { - this.context = context; - } - } -}