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

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