You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
873 B
32 lines
873 B
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();
|
|
}
|
|
} |