打印本文 打印本文 关闭窗口 关闭窗口
使用vb.net实现五子棋的人工智能3
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2377  更新时间:2009/4/23 19:01:34  文章录入:mintao  责任编辑:mintao
                If ca = 5 Then

                    Label1.Visible = True

                    Label1.Text = "电脑获胜,请重新开始"

                    PictureBox1.Refresh()

                    theplayflag = False

                    Exit Sub

                End If

            End If

        Next

        ''''检查电脑是否获胜

        For i = 0 To 191

            If pflag(i) = True Then

                pa = 0

                For j = 0 To 9

                    For k = 0 To 9

                        If table(j, k) = 2 Then

                            If pwin(j, k, i) = True Then

                                pa = pa + 1

                            End If

                        End If

                    Next

                Next

                If pa = 5 Then

                    Label1.Visible = True

                    Label1.Text = "玩家获胜,请重新开始"

                    PictureBox1.Refresh()

                    theplayflag = False

                    Exit Sub

                End If

            End If

        Next

        ''''检查玩家是否获胜

    End Sub

上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口