@ -94,9 +94,11 @@ public partial class Gameboard : ContentPage
if ( game . PlayerSwapping )
if ( game . PlayerSwapping )
{
{
game . SwapTilesNotified + = Game_SwapTilesNotified ;
game . SwapTiles ( game . GetPlayingPlayer ( ) , tilesSwap ) ;
game . SwapTiles ( game . GetPlayingPlayer ( ) , tilesSwap ) ;
tilesSwap . Clear ( ) ;
tilesSwap . Clear ( ) ;
game . PlayerSwapping = false ;
game . PlayerSwapping = false ;
game . SwapTilesNotified - = Game_SwapTilesNotified ;
}
}
else
else
{
{
@ -169,18 +171,12 @@ public partial class Gameboard : ContentPage
private void OnButtonSwapClicked ( object sender , EventArgs e )
private void OnButtonSwapClicked ( object sender , EventArgs e )
{
{
game . PlaceTileNotified + = Game_PlaceTileNotified ;
game . PlaceTileNotified + = Game_PlaceTileNotified ;
game . SwapTilesNotified + = Game_SwapTilesNotified ;
if ( game . CellsUsed . Count = = 0 & & ! game . PlayerSwapping )
if ( game . CellsUsed . Count = = 0 & & ! game . PlayerSwapping )
{
{
//DisplayAlert("Swap system", "\r\nWelcome to the swap system! To use the system, take the tiles you wish to swap and place them in the bag (you will not see the tiles disappear). Then, click on the skip button. /!\\ Attention, during the swap phase, you cannot play /!\\", "Copy !");
AnswerSwap ( ) ;
AnswerSwap ( ) ;
}
}
game . SwapTilesNotified - = Game_SwapTilesNotified ;
game . PlaceTileNotified - = Game_PlaceTileNotified ;
game . PlaceTileNotified - = Game_PlaceTileNotified ;
}
}