Exemplo n.º 1
0
 private async void Chessboard_ChessPiecePlaced(object sender, ChessPiecePlacedEventArgs e)
 {
     if (e.IsWin)
     {
         await StopThinking();
     }
 }
Exemplo n.º 2
0
        private void Chessboard_ChessPiecePlaced(object sender, ChessPiecePlacedEventArgs e)
        {
            this.Dispatcher.Invoke(() =>
            {
                setChessPiece(e.ChessPiece);
            });

            if (e.IsWin)
            {
                MessageBox.Show("Win!");
            }
        }