private async void Chessboard_ChessPiecePlaced(object sender, ChessPiecePlacedEventArgs e) { if (e.IsWin) { await StopThinking(); } }
private void Chessboard_ChessPiecePlaced(object sender, ChessPiecePlacedEventArgs e) { this.Dispatcher.Invoke(() => { setChessPiece(e.ChessPiece); }); if (e.IsWin) { MessageBox.Show("Win!"); } }