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.
30 lines
765 B
30 lines
765 B
using CoreLibrary;
|
|
using CoreLibrary.Events;
|
|
using CoreLibrary.Persistance;
|
|
using CoreLibrary.Regles;
|
|
|
|
namespace MauiSpark.Pages;
|
|
|
|
public partial class Mode : ContentPage
|
|
{
|
|
public Mode()
|
|
{
|
|
NavigationPage.SetHasBackButton(this, false);
|
|
NavigationPage.SetHasNavigationBar(this, false);
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void QuandReglesClassiques(Object? sender, EventArgs e)
|
|
{
|
|
Partie partie = new Partie(new ReglesClassiques(), new Persistance());
|
|
partie.DemanderNom += QuandDemanderNom;
|
|
partie.Jouer();
|
|
}
|
|
|
|
private void QuandDemanderNom(Object? sender, DemanderNomEventArgs e)
|
|
{
|
|
if(sender != null && sender is Partie)
|
|
Navigation.PushAsync(new ConnexionPage(sender as Partie, e));
|
|
}
|
|
} |