|
|
|
@ -31,7 +31,6 @@ public partial class Gameboard : ContentPage
|
|
|
|
|
|
|
|
|
|
public Gameboard()
|
|
|
|
|
{
|
|
|
|
|
game.EndOfGameNotified += Game_EndOfGameNotified;
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
BindingContext = game;
|
|
|
|
@ -44,6 +43,8 @@ public partial class Gameboard : ContentPage
|
|
|
|
|
private void Game_EndOfGameNotified(object? sender, EndOfGameNotifiedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
DisplayAlert("THE END.", "FAUT QU'ON PARLE DE CE QUE QU'ON VEUT FAIRE ICI !!!" ,"<3");
|
|
|
|
|
Navigation.PushAsync(new MainPage());
|
|
|
|
|
game.ClearGame();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnDragStarting(object sender, DragStartingEventArgs e)
|
|
|
|
@ -89,6 +90,7 @@ public partial class Gameboard : ContentPage
|
|
|
|
|
private void OnButtonSkipClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
game.NextPlayerNotified += Game_NextPlayerNotified;
|
|
|
|
|
game.EndOfGameNotified += Game_EndOfGameNotified;
|
|
|
|
|
|
|
|
|
|
if (game.PlayerSwapping)
|
|
|
|
|
{
|
|
|
|
@ -106,6 +108,7 @@ public partial class Gameboard : ContentPage
|
|
|
|
|
game.CheckGameOver(game.GetPlayingPlayer());
|
|
|
|
|
game.SetNextPlayer();
|
|
|
|
|
game.NextPlayerNotified -= Game_NextPlayerNotified;
|
|
|
|
|
game.EndOfGameNotified -= Game_EndOfGameNotified;
|
|
|
|
|
|
|
|
|
|
ChangeColorBC();
|
|
|
|
|
}
|
|
|
|
|