コード例 #1
0
ファイル: AI.cs プロジェクト: zhc0757/FiveInARow
 private async void Chessboard_ChessPiecePlaced(object sender, ChessPiecePlacedEventArgs e)
 {
     if (e.IsWin)
     {
         await StopThinking();
     }
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: zhc0757/FiveInARow
        private void Chessboard_ChessPiecePlaced(object sender, ChessPiecePlacedEventArgs e)
        {
            this.Dispatcher.Invoke(() =>
            {
                setChessPiece(e.ChessPiece);
            });

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