From bb59acaf57110f705065c119967572df0ef7f5f9 Mon Sep 17 00:00:00 2001 From: "jeremy.mouyon" Date: Sat, 25 May 2024 11:53:40 +0200 Subject: [PATCH] DRAG AND DROP ESTIE BESTIE BABY --- Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs | 10 ++++- Qwirkle/QwirkleViews/Pages/Gameboard.xaml | 39 ++++++++++++++++--- Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs | 3 ++ 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs b/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs index 951ea4e..cbc692c 100644 --- a/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs +++ b/Qwirkle/QwirkleViews/Pages/GameBoard.xaml.cs @@ -2,7 +2,6 @@ using QwirkleClassLibrary.Games; using QwirkleClassLibrary.Players; using QwirkleClassLibrary.Tiles; using System.Collections.ObjectModel; -using WinRT; namespace Qwirkle.Pages; @@ -14,8 +13,15 @@ public partial class Gameboard : ContentPage { InitializeComponent(); BindingContext = game; + + DisplayAlert("List", ((App)App.Current!).Game.PlayerList[0].Tiles[0].ToString(), "chut"); } public List PlayerCells1 { get; set; } = ((App)App.Current!).Game.PlayerList[0].Tiles.ToList(); - + + void OnDragOver(object sender, DragEventArgs e) + { + + } + } \ No newline at end of file diff --git a/Qwirkle/QwirkleViews/Pages/Gameboard.xaml b/Qwirkle/QwirkleViews/Pages/Gameboard.xaml index 4f8fe95..278ec76 100644 --- a/Qwirkle/QwirkleViews/Pages/Gameboard.xaml +++ b/Qwirkle/QwirkleViews/Pages/Gameboard.xaml @@ -6,10 +6,10 @@ Title="Gameboard" x:Name="root"> - + - @@ -18,14 +18,43 @@ - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs b/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs index 391aeff..5a054e8 100644 --- a/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs +++ b/Qwirkle/QwirkleViews/Pages/SetPlayers.xaml.cs @@ -50,6 +50,9 @@ public partial class SetPlayers : ContentPage if (game.AddPlayerInGame(playerstag)) { + game.StartGame(); + game.GiveTilesToPlayers(); + game.SetNextPlayer(); Navigation.PushAsync(new Gameboard()); }