diff --git a/Sources/CoreLibrary/Manager/Manager.cs b/Sources/CoreLibrary/Manager/Manager.cs index 55ad615..48ec4af 100644 --- a/Sources/CoreLibrary/Manager/Manager.cs +++ b/Sources/CoreLibrary/Manager/Manager.cs @@ -1,4 +1,5 @@ using CoreLibrary.Joueurs; +using CoreLibrary; using CoreLibrary.Regles; namespace CoreLibrary.Manager @@ -8,6 +9,14 @@ namespace CoreLibrary.Manager private Joueur[] joueurs = []; public IReadOnlyList Joueurs => Array.AsReadOnly(joueurs); + + public Partie Partie { get; private set; } + + public Manager() + { + Partie = new Partie(new ReglesClassiques()); + } + public void Charger() { joueurs = [ diff --git a/Sources/CoreLibrary/Partie.cs b/Sources/CoreLibrary/Partie.cs index c56a8bd..0699b67 100644 --- a/Sources/CoreLibrary/Partie.cs +++ b/Sources/CoreLibrary/Partie.cs @@ -10,7 +10,7 @@ namespace CoreLibrary /// public class Partie { - private readonly IRegles regles; + public IRegles Regles { get; private set; } /// diff --git a/Sources/MauiSpark/AppShell.xaml b/Sources/MauiSpark/AppShell.xaml index 7242e6c..02ae22b 100644 --- a/Sources/MauiSpark/AppShell.xaml +++ b/Sources/MauiSpark/AppShell.xaml @@ -37,4 +37,8 @@ Title="Egalite" ContentTemplate="{DataTemplate pages:Egalite}" /> + + diff --git a/Sources/MauiSpark/MauiProgram.cs b/Sources/MauiSpark/MauiProgram.cs index be3b5b2..bcd04ec 100644 --- a/Sources/MauiSpark/MauiProgram.cs +++ b/Sources/MauiSpark/MauiProgram.cs @@ -1,4 +1,5 @@ -using CoreLibrary.Manager; +using CoreLibrary.Events; +using CoreLibrary.Manager; using Microsoft.Extensions.Logging; namespace MauiSpark @@ -10,6 +11,9 @@ namespace MauiSpark public static MauiApp CreateMauiApp() { Manager.Charger(); + Manager.Partie.Jouer(); + + Manager.Partie.DemanderJoueur += (Object? sender, DemanderJoueurEventArgs e) => null; var builder = MauiApp.CreateBuilder(); builder diff --git a/Sources/MauiSpark/MauiSpark.csproj b/Sources/MauiSpark/MauiSpark.csproj index 01cba09..f180fbb 100644 --- a/Sources/MauiSpark/MauiSpark.csproj +++ b/Sources/MauiSpark/MauiSpark.csproj @@ -79,6 +79,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/Sources/MauiSpark/Pages/Plateau.xaml b/Sources/MauiSpark/Pages/Plateau.xaml new file mode 100644 index 0000000..9b21f98 --- /dev/null +++ b/Sources/MauiSpark/Pages/Plateau.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Sources/MauiSpark/Pages/Plateau.xaml.cs b/Sources/MauiSpark/Pages/Plateau.xaml.cs new file mode 100644 index 0000000..dfd0f0c --- /dev/null +++ b/Sources/MauiSpark/Pages/Plateau.xaml.cs @@ -0,0 +1,17 @@ +using CoreLibrary.Events; +using CoreLibrary.Manager; + +namespace MauiSpark.Pages; + +public partial class Plateau : ContentPage +{ + public Plateau() + { + InitializeComponent(); + } + + public void NouveauTour(Object? sender, NouveauTourEventArgs e) + { + BindingContext = e; + } +} \ No newline at end of file diff --git a/Sources/MauiSpark/Views/CTableauScore.xaml b/Sources/MauiSpark/Views/CTableauScore.xaml index 41cfb3b..f3977d5 100644 --- a/Sources/MauiSpark/Views/CTableauScore.xaml +++ b/Sources/MauiSpark/Views/CTableauScore.xaml @@ -1,4 +1,4 @@ - + diff --git a/Sources/MauiSpark/Views/CTableauScore.xaml.cs b/Sources/MauiSpark/Views/CTableauScore.xaml.cs index 0834793..c1f1136 100644 --- a/Sources/MauiSpark/Views/CTableauScore.xaml.cs +++ b/Sources/MauiSpark/Views/CTableauScore.xaml.cs @@ -1,9 +1,5 @@ -using CoreLibrary.Events; using CoreLibrary.Joueurs; using CoreLibrary.Manager; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Runtime.CompilerServices; namespace MauiSpark.Views; @@ -135,7 +131,7 @@ public class JoueurClassementAlphabet } } - public partial class CTableauScore : ContentView +public partial class CTableauScore : ContentView { public int NbCliquer { get; set; } = 0;