diff --git a/Qwirkle/QwirkleViews/App.xaml.cs b/Qwirkle/QwirkleViews/App.xaml.cs index da15420..5d6fc10 100644 --- a/Qwirkle/QwirkleViews/App.xaml.cs +++ b/Qwirkle/QwirkleViews/App.xaml.cs @@ -1,6 +1,7 @@ using Qwirkle.Views; using Microsoft.Maui.Controls; using Qwirkle.Pages; +using QwirkleClassLibrary.Games; namespace Qwirkle { @@ -13,6 +14,9 @@ namespace Qwirkle MainPage = new AppShell(); Routing.RegisterRoute(nameof(SetPlayers), typeof(SetPlayers)); + } + + public Game Game { get; set; } = new(); } } diff --git a/Qwirkle/QwirkleViews/MainPage.xaml b/Qwirkle/QwirkleViews/MainPage.xaml index c2ca4fa..364a29c 100644 --- a/Qwirkle/QwirkleViews/MainPage.xaml +++ b/Qwirkle/QwirkleViews/MainPage.xaml @@ -22,19 +22,19 @@ - + - + - + - + diff --git a/Qwirkle/QwirkleViews/MainPage.xaml.cs b/Qwirkle/QwirkleViews/MainPage.xaml.cs index e73c4f4..ddbaa35 100644 --- a/Qwirkle/QwirkleViews/MainPage.xaml.cs +++ b/Qwirkle/QwirkleViews/MainPage.xaml.cs @@ -15,46 +15,8 @@ namespace Qwirkle BindingContext = this; } - - public ButtonShadow Button1 { get; set; } - = new ButtonShadow - { - Text = "Play" - }; - - public ButtonShadow Button2 { get; set; } - = new ButtonShadow - { - Text = "Continue" - }; - - public ButtonShadow Button3 { get; set; } - = new ButtonShadow - { - Text = "Leaderboard" - }; - - public ButtonShadow Button4 { get; set; } - = new ButtonShadow - { - Text = "Rules" - }; - - public ButtonShadow Button5 { get; set; } - = new ButtonShadow - { - Text = "Settings" - }; - - public ButtonShadow Button6 { get; set; } - = new ButtonShadow - { - Text = "Credits" - }; - - void OnInfoClicked(object sender, EventArgs e) + public void OnInfoClicked(object sender, EventArgs e) { - Game game = new Game(); DisplayAlert("Game notification", "Enter minimun 2 player and max 4 player !", "Ok ! Lets's go !"); Navigation.PushAsync(new SetPlayers()); diff --git a/Qwirkle/QwirkleViews/MauiProgram.cs b/Qwirkle/QwirkleViews/MauiProgram.cs index cdd1ba8..36d59df 100644 --- a/Qwirkle/QwirkleViews/MauiProgram.cs +++ b/Qwirkle/QwirkleViews/MauiProgram.cs @@ -6,6 +6,7 @@ namespace Qwirkle { public static MauiApp CreateMauiApp() { + var builder = MauiApp.CreateBuilder(); builder .UseMauiApp() @@ -19,6 +20,7 @@ namespace Qwirkle builder.Logging.AddDebug(); #endif + return builder.Build(); } } diff --git a/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml b/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml index 3c0714e..a3f4ae9 100644 --- a/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml +++ b/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml @@ -11,17 +11,13 @@ Text="SetPlayers" Style="{StaticResource Title}"/> - - - + - + - + + +