using CoreLibrary; using CoreLibrary.Regles; using MauiSpark.Pages; namespace MauiSpark.Vues; public partial class ModeVue : ContentView { public static readonly BindableProperty ReglesProperty = BindableProperty.Create(nameof(Regles), typeof(IRegles), typeof(ModeVue), null); public IRegles Regles { get => (IRegles)GetValue(ReglesProperty); set => SetValue(ReglesProperty, value); } public ModeVue() { InitializeComponent(); } private void QuandReglesPresse(Object sender, EventArgs e) { Partie partie = MauiProgram.Manageur.NouvellePartie(Regles); partie.PartieDemanderJoueur += new ConnexionPage().QuandDemanderNom; partie.PartiePartieTerminee += new VictoirePage().QuandPartieTerminee; partie.PartieNouveauTour += new PlateauPage().QuandNouveauTour; partie.Jouer(); } }