예제 #1
0
        async Task ISolitaireBoardEvents.PieceSelectedAsync(GameSpace space, SolitaireBoardGameMainGameClass game)
        {
            if (space.Vector.Equals(game.PreviousPiece) == false)
            {
                await game.HightlightSpaceAsync(space);

                return;
            }
            game.SelectUnSelectSpace(space);
        }
예제 #2
0
        async Task ISolitaireBoardEvents.PiecePlacedAsync(GameSpace space, SolitaireBoardGameMainGameClass game)
        {
            if (game.IsValidMove(space) == false)
            {
                await UIPlatform.ShowMessageAsync("Illegal Move");

                await game.UnselectPieceAsync(space);

                return;
            }
            await game.MakeMoveAsync(space);
        }