MaOC五子棋源码

Posted LazyChun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MaOC五子棋源码相关的知识,希望对你有一定的参考价值。

想当初天真无知,写出了这种雷人代码:

Public Class Form1
    Dim MaOC(22, 22) As Integer
    Dim u As Integer
    Dim Yourname As String
    Dim place As String
    Dim count As Integer
    Dim bon As Integer

  



    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        count = 0
        bon = 0
        place = "c:\Users\lenovo\Desktop\uuu.png"
        For i = 0 To 22
            For j = 0 To 22
                MaOC(i, j) = 1000
            Next
        Next
        For x = 4 To 18
            For y = 4 To 18
                MaOC(x, y) = 0
            Next
        Next
        VicLo()
    End Sub

    Private Sub PictureBox1_Click_1(sender As Object, e As EventArgs) Handles PictureBox1.Click
        allsee()

    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs)


    End Sub

    Private Sub TextBox1_Click(sender As Object, e As EventArgs) Handles TextBox1.KeyDown
        If TextBox1.Text <> "" Then
            Yourname = TextBox1.Text

            If Yourname = "MaOC" Then
                Label7.Text = "哈哈,我们的名字一样"

            End If
            If Yourname = "Artist" Then
                Label7.Text = "你真的是我的主人吗?"
            End If
            Label6.Text = "hi,你好" & Yourname
            Label2.Visible = True
            Label4.Visible = True

            Label5.Text = "那我们现在开始OK?"

            Button5.Visible = True
            TextBox1.Visible = False
            Button6.Visible = False
        End If
    End Sub

   



    Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click

    End Sub

    Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox1i1.Click
        If MaOC(4, 4) <> 1 And MaOC(4, 4) <> 100 Then
            MaOC(4, 4) = 100
            PictureBox1i1.BackColor = Color.Gold
            
            cou()
            nosee()
            VicLo()
            beatback()
        End If
    End Sub

    Private Sub PictureBox3_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub PictureBox4_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub PictureBox7_Click(sender As Object, e As EventArgs) Handles PictureBox1i5.Click
        If MaOC(4, 8) <> 1 And MaOC(4, 8) <> 100 Then
            MaOC(4, 8) = 100
            PictureBox1i5.BackColor = Color.Gold

            cou()
            nosee()
            VicLo()
            beatback()
        End If
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click

        Label5.Text = ""
        Label5.Text = "哈哈,其实我也累了"
        Me.Close()



    End Sub
    Sub VicLo()
        For i = 4 To 18
            For j = 4 To 18
                If MaOC(i, j) + MaOC(i, j + 1) + MaOC(i, j + 2) + MaOC(i, j + 3) + MaOC(i, j + 4) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i + 1, j + 1) + MaOC(i + 2, j + 2) + MaOC(i + 3, j + 3) + MaOC(i + 4, j + 4) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i - 1, j + 1) + MaOC(i - 2, j + 2) + MaOC(i - 3, j + 3) + MaOC(i - 4, j + 4) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i + 1, j) + MaOC(i + 2, j) + MaOC(i + 3, j) + MaOC(i + 4, j) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i, j - 1) + MaOC(i, j - 2) + MaOC(i, j - 3) + MaOC(i, j - 4) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i + 1, j - 1) + MaOC(i + 2, j - 2) + MaOC(i + 3, j - 3) + MaOC(i + 4, j - 4) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i - 1, j) + MaOC(i - 2, j) + MaOC(i - 3, j) + MaOC(i - 4, j) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i - 1, j - 1) + MaOC(i - 2, j - 2) + MaOC(i - 3, j - 3) + MaOC(i - 4, j - 4) = 500 Then
                    Label5.Text = ""
                    Label5.Text = "好吧,让你赢一回"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i, j + 1) + MaOC(i, j + 2) + MaOC(i, j + 3) + MaOC(i, j + 4) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i + 1, j + 1) + MaOC(i + 2, j + 2) + MaOC(i + 3, j + 3) + MaOC(i + 4, j + 4) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i - 1, j + 1) + MaOC(i - 2, j + 2) + MaOC(i - 3, j + 3) + MaOC(i - 4, j + 4) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i + 1, j) + MaOC(i + 2, j) + MaOC(i + 3, j) + MaOC(i + 4, j) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i, j - 1) + MaOC(i, j - 2) + MaOC(i, j - 3) + MaOC(i, j - 4) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i + 1, j - 1) + MaOC(i + 2, j - 2) + MaOC(i + 3, j - 3) + MaOC(i + 4, j - 4) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i - 1, j) + MaOC(i - 2, j) + MaOC(i - 3, j) + MaOC(i - 4, j) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
                If MaOC(i, j) + MaOC(i - 1, j - 1) + MaOC(i - 2, j - 2) + MaOC(i - 3, j - 3) + MaOC(i - 4, j - 4) = 5 Then
                    Label5.Text = ""
                    Label5.Text = "再去练练吧,你不是我对手"
                    Button1.Enabled = False
                    Button2.Enabled = False
                    unusing()
                    Button3.Enabled = True
                    PictureBox1.Enabled = False
                    bon = 1
                End If
            Next
        Next

    End Sub
    Sub unusing()
        u = -1
    End Sub

    Private Sub PictureBox1i1_DoubleClick(sender As Object, e As EventArgs) Handles PictureBox1i1.DoubleClick

    End Sub

    Private Sub PictureBox1i1_MouseUp(sender As Object, e As MouseEventArgs) Handles PictureBox1i1.MouseUp

    End Sub
    Sub allsee()
        PictureBox1i1.Visible = True
        PictureBox1i2.Visible = True
        PictureBox1i3.Visible = True
        PictureBox1i4.Visible = True
        PictureBox1i5.Visible = True
        PictureBox1i6.Visible = True
        PictureBox1i7.Visible = True
        PictureBox1i8.Visible = True
        PictureBox1i9.Visible = True
        PictureBox1i10.Visible = True
        PictureBox1i11.Visible = True
        PictureBox1i12.Visible = True
        PictureBox1i13.Visible = True
        PictureBox1i14.Visible = True
        PictureBox1i15.Visible = True
        PictureBox2i1.Visible = True
        PictureBox2i2.Visible = True
        PictureBox2i3.Visible = True
        PictureBox2i4.Visible = True
        PictureBox2i5.Visible = True
        PictureBox2i6.Visible = True
        PictureBox2i7.Visible = True
        PictureBox2i8.Visible = True
        PictureBox2i9.Visible = True
        PictureBox2i10.Visible = True
        PictureBox2i11.Visible = True
        PictureBox2i12.Visible = True
        PictureBox2i13.Visible = True
        PictureBox2i14.Visible = True
        PictureBox2i15.Visible = True
        PictureBox3i1.Visible = True
        PictureBox3i2.Visible = True
        PictureBox3i3.Visible = True
        PictureBox3i4.Visible = True
        PictureBox3i5.Visible = True
        PictureBox3i6.Visible = True
        PictureBox3i7.Visible = True
        PictureBox3i8.Visible = True
        PictureBox3i9.Visible = True
        PictureBox3i10.Visible = True
        PictureBox3i11.Visible = True
        PictureBox3i12.Visible = True
        PictureBox3i13.Visible = True
        PictureBox3i14.Visible = True
        PictureBox3i15.Visible = True
        PictureBox4i1.Visible = True
        PictureBox4i2.Visible = True
        PictureBox4i3.Visible = True
        PictureBox4i4.Visible = True
        PictureBox4i5.Visible = True
        PictureBox4i6.Visible = True
        PictureBox4i7.Visible = True
        PictureBox4i8.Visible = True
        PictureBox4i9.Visible = True
        PictureBox4i10.Visible = True
        PictureBox4i11.Visible = True
        PictureBox4i12.Visible = True
        PictureBox4i13.Visible = True
        PictureBox4i14.Visible = True
        PictureBox4i15.Visible = True
        PictureBox5i1.Visible = True
        PictureBox5i2.Visible = True
        PictureBox5i3.Visible = True
        PictureBox5i4.Visible = True
        PictureBox5i5.Visible = True
        PictureBox5i6.Visible = True
        PictureBox5i7.Visible = True
        PictureBox5i8.Visible = True
        PictureBox5i9.Visible = True
        PictureBox5i10.Visible = True
        PictureBox5i11.Visible = True
        PictureBox5i12.Visible = True
        PictureBox5i13.Visible = True
        PictureBox5i14.Visible = True
        PictureBox5i15.Visible = True
        PictureBox6i1.Visible = True
        PictureBox6i2.Visible = True
        PictureBox6i3.Visible = True
        PictureBox6i4.Visible = True
        PictureBox6i5.Visible = True
        PictureBox6i6.Visible = True
        PictureBox6i7.Visible = True
        PictureBox6i8.Visible = True
        PictureBox6i9.Visible = True
        PictureBox6i10.Visible = True
        PictureBox6i11.Visible = True
        PictureBox6i12.Visible = True
        PictureBox6i13.Visible = True
        PictureBox6i14.Visible = True
        PictureBox6i15.Visible = True
        PictureBox7i1.Visible = True
        PictureBox7i2.Visible = True
        PictureBox7i3.Visible = True
        PictureBox7i4.Visible = True
        PictureBox7i5.Visible = True
        PictureBox7i6.Visible = True
        PictureBox7i7.Visible = True
        PictureBox7i8.Visible = True
        PictureBox7i9.Visible = True
        PictureBox7i10.Visible = True
        PictureBox7i11.Visible = True
        PictureBox7i12.Visible = True
        PictureBox7i13.Visible = True
        PictureBox7i14.Visible = True
        PictureBox7i15.Visible = True
        PictureBox8i1.Visible = True
        PictureBox8i2.Visible = True
        PictureBox8i3.Visible = True
        PictureBox8i4.Visible = True
        PictureBox8i5.Visible = True
        PictureBox8i6.Visible = True
        PictureBox8i7.Visible = True
        PictureBox8i8.Visible = True
        PictureBox8i9.Visible = True
        PictureBox8i10.Visible = True
        PictureBox8i11.Visible = True
        PictureBox8i12.Visible = True
        PictureBox8i13.Visible = True
        PictureBox8i14.Visible = True
        PictureBox8i15.Visible = True
        PictureBox9i1.Visible = True
        PictureBox9i2.Visible = True
        PictureBox9i3.Visible = True
        PictureBox9i4.Visible = True
        PictureBox9i5.Visible = True
        PictureBox9i6.Visible = True
        PictureBox9i7.Visible = True
        PictureBox9i8.Visible = True
        PictureBox9i9.Visible = True
        PictureBox9i10.Visible = True
        PictureBox9i11.Visible = True
        PictureBox9i12.Visible = True
        PictureBox9i13.Visible = True
        PictureBox9i14.Visible = True
        PictureBox9i15.Visible = True
        PictureBox10i1.Visible = True
        PictureBox10i2.Visible = True
        PictureBox10i3.Visible = True
        PictureBox10i4.Visible = True
        PictureBox10i5.Visible = True
        PictureBox10i6.Visible = True
        PictureBox10i7.Visible = True
        PictureBox10i8.Visible = True
        PictureBox10i9.Visible = True
        PictureBox10i10.Visible = True
        PictureBox10i11.Visible = True
        PictureBox10i12.Visible = True
        PictureBox10i13.Visible = True
        PictureBox10i14.Visible = True
        PictureBox10i15.Visible = True
        PictureBox11i1.Visible = True
        PictureBox11i2.Visible = True
        PictureBox11i3.Visible = True
        PictureBox11i4.Visible = True
        PictureBox11i5.Visible = True
        PictureBox11i6.Visible = True
        PictureBox11i7.Visible = True
        PictureBox11i8.Visible = True
        PictureBox11i9.Visible = True
        PictureBox11i10.Visible = True
        PictureBox11i11.Visible = True
        PictureBox11i12.Visible = True
        PictureBox11i13.Visible = True
        PictureBox11i14.Visible = True
        PictureBox11i15.Visible = True
        PictureBox12i1.Visible = True
        PictureBox12i2.Visible = True
        PictureBox12i3.Visible = True
        PictureBox12i4.Visible = True
        PictureBox12i5.Visible = True
        PictureBox12i6.Visible = True
        PictureBox12i7.Visible = True
        PictureBox12i8.Visible = True
        PictureBox12i9.Visible = True
        PictureBox12i10.Visible = True
        PictureBox12i11.Visible = True
        PictureBox12i12.Visible = True
        PictureBox12i13.Visible = True
        PictureBox12i14.Visible = True
        PictureBox12i15.Visible = True
        PictureBox13i1.Visible = True
        PictureBox13i2.Visible = True
        PictureBox13i3.Visible = True
        PictureBox13i4.Visible = True
        PictureBox13i5.Visible = True
        PictureBox13i6.Visible = True
        PictureBox13i7.Visible = True
        PictureBox13i8.Visible = True
        PictureBox13i9.Visible = True
        PictureBox13i10.Visible = True
        PictureBox13i11.Visible = True
        PictureBox13i12.Visible = True
        PictureBox13i13.Visible = True
        PictureBox13i14.Visible = True
        PictureBox13i15.Visible = True
        PictureBox14i1.Visible = True
        PictureBox14i2.Visible = True
        PictureBox14i3.Visible = True
        PictureBox14i4.Visible = True
        PictureBox14i5.Visible = True
        PictureBox14i6.Visible = True
        PictureBox14i7.Visible = True
        PictureBox14i8.Visible = True
        PictureBox14i9.Visible = True
        PictureBox14i10.Visible = True
        PictureBox14i11.Visible = True
        PictureBox14i12.Visible = True
        PictureBox14i13.Visible = True
        PictureBox14i14.Visible = True
        PictureBox14i15.Visible = True
        PictureBox15i1.Visible = True
        PictureBox15i2.Visible = True
        PictureBox15i3.Visible = True
        PictureBox15i4.Visible = True
        PictureBox15i5.Visible = True
        PictureBox15i6.Visible = True
        PictureBox15i7.Visible = True
        PictureBox15i8.Visible = True
        PictureBox15i9.Visible = True
        PictureBox15i10.Visible = True
        PictureBox15i11.Visible = True
        PictureBox15i12.Visible = True
        PictureBox15i13.Visible = True
        PictureBox15i14.Visible = True
        PictureBox15i15.Visible = True

    End Sub


    Private Sub PictureBox1i15_Click(sender As Object, e As EventArgs) Handles PictureBox1i14.Click
        If MaOC(4, 17) <> 1 And MaOC(4, 17) <> 100 Then
            MaOC(4, 17) = 100
            PictureBox1i14.BackColor = Color.Gold

            cou()
            nosee()
            VicLo()
            beatback()
        End If
    End Sub
    Sub nosee()
        If MaOC(4, 4) = 0 Then
            PictureBox1i1.Visible = False
        End If
        If MaOC(4, 5) = 0 Then
            PictureBox1i2.Visible = False
        End If
        If MaOC(4, 6) = 0 Then
            PictureBox1i3.Visible = False
        End If
        If MaOC(4, 7) = 0 Then
            PictureBox1i4.Visible = False
        End If
        If MaOC(4, 8) = 0 Then
            PictureBox1i5.Visible = False
        End If
        If MaOC(4, 9) = 0 Then
            PictureBox1i6.Visible = False
        End If
        If MaOC(4, 10) = 0 Then
            PictureBox1i7.Visible = False
        End If
        If MaOC(4, 11) = 0 Then
            PictureBox1i8.Visible = False
        End If
        If MaOC(4, 12) = 0 Then
            PictureBox1i9.Visible = False
        End If
        If MaOC(4, 13) = 0 Then
            PictureBox1i10.Visible = False
        End If
        If MaOC(4, 14) = 0 Then
            PictureBox1i11.Visible = False
        End If
        If MaOC(4, 15) = 0 Then
            PictureBox1i12.Visible = False
        End If
        If MaOC(4, 16) = 0 Then
            PictureBox1i13.Visible = False
        End If
        If MaOC(4, 17) = 0 Then
            PictureBox1i14.Visible = False
        End If
        If MaOC(4, 18) = 0 Then
            PictureBox1i15.Visible = False
        End If
        If MaOC(5, 4) = 0 Then
            PictureBox2i1.Visible = False
        End If
        If MaOC(5, 5) = 0 Then
            PictureBox2i2.Visible = False
        End If
        If MaOC(5, 6) = 0 Then
            PictureBox2i3.Visible = False
        End If
        If MaOC(5, 7) = 0 Then
            PictureBox2i4.Visible = False
        End If
        If MaOC(5, 8) = 0 Then
            PictureBox2i5.Visible = False
        End If
        If MaOC(5, 9) = 0 Then
            PictureBox2i6.Visible = False
        End If
        If MaOC(5, 10) = 0 Then
            PictureBox2i7.Visible = False
        End If
        If MaOC(5, 11) = 0 Then
            PictureBox2i8.Visible = False
        End If
        If MaOC(5, 12) = 0 Then
            PictureBox2i9.Visible = False
        End If
        If MaOC(5, 13) = 0 Then
            PictureBox2i10.Visible = False
        End If
        If MaOC(5, 14) = 0 Then
            PictureBox2i11.Visible = False
        End If
        If MaOC(5, 15) = 0 Then
            PictureBox2i12.Visible = False
        End If
        If MaOC(5, 16) = 0 Then
            PictureBox2i13.Visible = False
        End If
        If MaOC(5, 17) = 0 Then
            PictureBox2i14.Visible = False
        End If
        If MaOC(5, 18) = 0 Then
            PictureBox2i15.Visible = False
        End If
        If MaOC(6, 4) = 0 Then
            PictureBox3i1.Visible = False
        End If
        If MaOC(6, 5) = 0 Then
            PictureBox3i2.Visible = False
        End If
        If MaOC(6, 6) = 0 Then
            PictureBox3i3.Visible = False
        End If
        If MaOC(6, 7) = 0 Then
            PictureBox3i4.Visible = False
        End If
        If MaOC(6, 8) = 0 Then
            PictureBox3i5.Visible = False
        End If
        If MaOC(6, 9) = 0 Then
            PictureBox3i6.Visible = False
        End If
        If MaOC(6, 10) = 0 Then
            PictureBox3i7.Visible = False
        End If
        If MaOC(6, 11) = 0 Then
            PictureBox3i8.Visible = False
        End If
        If MaOC(6, 12) = 0 Then
            PictureBox3i9.Visible = False
        End If
        If MaOC(6, 13) = 0 Then
            PictureBox3i10.Visible = False
        End If
        If MaOC(6, 14) = 0 Then
            PictureBox3i11.Visible = False
        End If
        If MaOC(6, 15) = 0 Then
            PictureBox3i12.Visible = False
        End If
        If MaOC(6, 16) = 0 Then
            PictureBox3i13.Visible = False
        End If
        If MaOC(6, 17) = 0 Then
            PictureBox3i14.Visible = False
        End If
        If MaOC(6, 18) = 0 Then
            PictureBox3i15.Visible = False
        End If
        If MaOC(7, 4) = 0 Then
            PictureBox4i1.Visible = False
        End If
        If MaOC(7, 5) = 0 Then
            PictureBox4i2.Visible = False
        End If
        If MaOC(7, 6) = 0 Then
            PictureBox4i3.Visible = False
        End If
        If MaOC(7, 7) = 0 Then
            PictureBox4i4.Visible = False
        End If
        If MaOC(7, 8) = 0 Then
            PictureBox4i5.Visible = False
        End If
        If MaOC(7, 9) = 0 Then
            PictureBox4i6.Visible = False
        End If
        If MaOC(7, 10) = 0 Then
            PictureBox4i7.Visible = False
        End If
        If MaOC(7, 11) = 0 Then
            PictureBox4i8.Visible = False
        End If
        If MaOC(7, 12) = 0 Then
            PictureBox4i9.Visible = False
        End If
        If MaOC(7, 13) = 0 Then
            PictureBox4i10.Visible = False
        End If
        If MaOC(7, 14) = 0 Then
            PictureBox4i11.Visible = False
        End If
        If MaOC(7, 15) = 0 Then
            PictureBox4i12.Visible = False
        End If
        If MaOC(7, 16) = 0 Then
            PictureBox4i13.Visible = False
        End If
        If MaOC(7, 17) = 0 Then
            PictureBox4i14.Visible = False
        End If
        If MaOC(7, 18) = 0 Then
            PictureBox4i15.Visible = False
        End If
        If MaOC(8, 4) = 0 Then
            PictureBox5i1.Visible = False
        End If
        If MaOC(8, 5) = 0 Then
            PictureBox5i2.Visible = False
        End If
        If MaOC(8, 6) = 0 Then
            PictureBox5i3.Visible = False
        End If
        If MaOC(8, 7) = 0 Then
            PictureBox5i4.Visible = False
        End If
        If MaOC(8, 8) = 0 Then
            PictureBox5i5.Visible = False
        End If
        If MaOC(8, 9) = 0 Then
            PictureBox5i6.Visible = False
        End If
        If MaOC(8, 10) = 0 Then
            PictureBox5i7.Visible = False
        End If
        If MaOC(8, 11) = 0 Then
            PictureBox5i8.Visible = False
        End If
        If MaOC(8, 12) = 0 Then
            PictureBox5i9.Visible = False
        End If
        If MaOC(8, 13) = 0 Then
            PictureBox5i10.Visible = False
        End If
        If MaOC(8, 14) = 0 Then
            PictureBox5i11.Visible = False
        End If
        If MaOC(8, 15) = 0 Then
            PictureBox5i12.Visible = False
        End If
        If MaOC(8, 16) = 0 Then
            PictureBox5i13.Visible = False
        End If
        If MaOC(8, 17) = 0 Then
            PictureBox5i14.Visible = False
        End If
        If MaOC(8, 18) = 0 Then
            PictureBox5i15.Visible = False
        End If
        If MaOC(9, 4) = 0 Then
            PictureBox6i1.Visible = False
        End If
        If MaOC(9, 5) = 0 Then
            PictureBox6i2.Visible = False
        End If
        If MaOC(9, 6) = 0 Then
            PictureBox6i3.Visible = False
        End If
        If MaOC(9, 7) = 0 Then
            PictureBox6i4.Visible = False
        End If
        If MaOC(9, 8) = 0 Then
            PictureBox6i5.Visible = False
        End If
        If MaOC(9, 9) = 0 Then
            PictureBox6i6.Visible = False
        End If
        If MaOC(9, 10) = 0 Then
            PictureBox6i7.Visible = False
        End If
        If MaOC(9, 11) = 0 Then
            PictureBox6i8.Visible = False
        End If
        If MaOC(9, 12) = 0 Then
            PictureBox6i9.Visible = False
        End If
        If MaOC(9, 13) = 0 Then
            PictureBox6i10.Visible = False
        End If
        If MaOC(9, 14) = 0 Then
            PictureBox6i11.Visible = False
        End If
        If MaOC(9, 15) = 0 Then
            PictureBox6i12.Visible = False
        End If
        If MaOC(9, 16) = 0 Then
            PictureBox6i13.Visible = False
        End If
        If MaOC(9, 17) = 0 Then
            PictureBox6i14.Visible = False
        End If
        If MaOC(9, 18) = 0 Then
            PictureBox6i15.Visible = False
        End If
        If MaOC(10, 4) = 0 Then
            PictureBox7i1.Visible = False
        End If
        If MaOC(10, 5) = 0 Then
            PictureBox7i2.Visible = False
        End If
        If MaOC(10, 6) = 0 Then
            PictureBox7i3.Visible = False
        End If
        If MaOC(10, 7) = 0 Then
            PictureBox7i4.Visible = False
        End If
        If MaOC(10, 8) = 0 Then
            PictureBox7i5.Visible = False
        End If
        If MaOC(10, 9) = 0 Then
            PictureBox7i6.Visible = False
        End If
        If MaOC(10, 10) = 0 Then
            PictureBox7i7.Visible = False
        End If
        If MaOC(10, 11) = 0 Then
            PictureBox7i8.Visible = False
        End If
        If MaOC(10, 12) = 0 Then
            PictureBox7i9.Visible = False
        End If
        If MaOC(10, 13) = 0 Then
            PictureBox7i10.Visible = False
        End If
        If MaOC(10, 14) = 0 Then
            PictureBox7i11.Visible = False
        End If
        If MaOC(10, 15) = 0 Then
            PictureBox7i12.Visible = False
        End If
        If MaOC(10, 16) = 0 Then
            PictureBox7i13.Visible = False
        End If
        If MaOC(10, 17) = 0 Then
            PictureBox7i14.Visible = False
        End If
        If MaOC(10, 18) = 0 Then
            PictureBox7i15.Visible = False
        End If
        If MaOC(11, 4) = 0 Then
            PictureBox8i1.Visible = False
        End If
        If MaOC(11, 5) = 0 Then
            PictureBox8i2.Visible = False
        End If
        If MaOC(11, 6) = 0 Then
            PictureBox8i3.Visible = False
        End If
        If MaOC(11, 7) = 0 Then
            PictureBox8i4.Visible = False
        End If
        If MaOC(11, 8) = 0 Then
            PictureBox8i5.Visible = False
        End If
        If MaOC(11, 9) = 0 Then
            PictureBox8i6.Visible = False
        End If
        If MaOC(11, 10) = 0 Then
            PictureBox8i7.Visible = False
        End If
        If MaOC(11, 11) = 0 Then
            PictureBox8i8.Visible = False
        End If
        If MaOC(11, 12) = 0 Then
            PictureBox8i9.Visible = False
        End If
        If MaOC(11, 13) = 0 Then
            PictureBox8i10.Visible = False
        End If
        If MaOC(11, 14) = 0 Then
            PictureBox8i11.Visible = False
        End If
        If MaOC(11, 15) = 0 Then
            PictureBox8i12.Visible = False
        End If
        If MaOC(11, 16) = 0 Then
            PictureBox8i13.Visible = False
        End If
        If MaOC(11, 17) = 0 Then
            PictureBox8i14.Visible = False
        End If
        If MaOC(11, 18) = 0 Then
            PictureBox8i15.Visible = False
        End If
        If MaOC(12, 4) = 0 Then
            PictureBox9i1.Visible = False
        End If
        If MaOC(12, 5) = 0 Then
            PictureBox9i2.Visible = False
        End If
        If MaOC(12, 6) = 0 Then
            PictureBox9i3.Visible = False
        End If
        If MaOC(12, 7) = 0 Then
            PictureBox9i4.Visible = False
        End If
        If MaOC(12, 8) = 0 Then
            PictureBox9i5.Visible = False
        End If
        If MaOC(12, 9) = 0 Then
            PictureBox9i6.Visible = False
        End If
        If MaOC(12, 10) = 0 Then
            PictureBox9i7.Visible = False
        End If
        If MaOC(12, 11) = 0 Then
            PictureBox9i8.Visible = False
        End If
        If MaOC(12, 12) = 0 Then
            PictureBox9i9.Visible = False
        End If
        If MaOC(12, 13) = 0 Then
            PictureBox9i10.Visible = False
        End If
        If MaOC(12, 14) = 0 Then
            PictureBox9i11.Visible = False
        End If
        If MaOC(12, 15) = 0 Then
            PictureBox9i12.Visible = False
        End If
        If MaOC(12, 16) = 0 Then
            PictureBox9i13.Visible = False
        End If
        If MaOC(12, 17) = 0 Then
            PictureBox9i14.Visible = False
        End If
        If MaOC(12, 18) = 0 Then
            PictureBox9i15.Visible = False
        End If
        If MaOC(13, 4) = 0 Then
            PictureBox10i1.Visible = False
        End If
        If MaOC(13, 5) = 0 Then
            PictureBox10i2.Visible = False
        End If
        If MaOC(13, 6) = 0 Then
            PictureBox10i3.Visible = False
        End If
        If MaOC(13, 7) = 0 Then
            PictureBox10i4.Visible = False
        End If
        If MaOC(13, 8) = 0 Then
            PictureBox10i5.Visible = False
        End If
        If MaOC(13, 9) = 0 Then
            PictureBox10i6.Visible = False
        End If
        If MaOC(13, 10) = 0 Then
            PictureBox10i7.Visible = False
        End If
        If MaOC(13, 11) = 0 Then
            PictureBox10i8.Visible = False
        End If
        If MaOC(13, 12) = 0 Then
            PictureBox10i9.Visible = False
        End If
        If MaOC(13, 13) = 0 Then
            PictureBox10i10.Visible = False
        End If
        If MaOC(13, 14) = 0 Then
            PictureBox10i11.Visible = False
        End If
        If MaOC(13, 15) = 0 Then
            PictureBox10i12.Visible = False
        End If
        If MaOC(13, 16) = 0 Then
            PictureBox10i13.Visible = False
        End If
        If MaOC(13, 17) = 0 Then
            PictureBox10i14.Visible = False
        End If
        If MaOC(13, 18) = 0 Then
            PictureBox10i15.Visible = False
        End If

        If MaOC(14, 4) = 0 Then
            PictureBox11i1.Visible = False
        End If
        If MaOC(14, 5) = 0 Then
            PictureBox11i2.Visible = False
        End If
        If MaOC(14, 6) = 0 Then
            PictureBox11i3.Visible = False
        End If
        If MaOC(14, 7) = 0 Then
            PictureBox11i4.Visible = False
        End If
        If MaOC(14, 8) = 0 Then
            PictureBox11i5.Visible = False
        End If
        If MaOC(14, 9) = 0 Then
            PictureBox11i6.Visible = False
        End If
        If MaOC(14, 10) = 0 Then
            PictureBox11i7.Visible = False
        End If
        If MaOC(14, 11) = 0 Then
            PictureBox11i8.Visible = False
        End If
        If MaOC(14, 12) = 0 Then
            PictureBox11i9.Visible = False
        End If
        If MaOC(14, 13) = 0 Then
            PictureBox11i10.Visible = False
        End If
        If MaOC(14, 14) = 0 Then
            PictureBox11i11.Visible = False
        End If
        If MaOC(14, 15) = 0 Then
            PictureBox11i12.Visible = False
        End If
        If MaOC(14, 16) = 0 Then
            PictureBox11i13.Visible = False
        End If
        If MaOC(14, 17) = 0 Then
            PictureBox11i14.Visible = False
        End If
        If MaOC(14, 18) = 0 Then
            PictureBox11i15.Visible = False
        End If
        If MaOC(15, 4) = 0 Then
            PictureBox12i1.Visible = False
        End If
        If MaOC(15, 5) = 0 Then
            PictureBox12i2.Visible = False
        End If
        If MaOC(15, 6) = 0 Then
            PictureBox12i3.Visible = False
        End If
        If MaOC(15, 7) = 0 Then
            PictureBox12i4.Visible = False
        End If
        If MaOC(15, 8) = 0 Then
            PictureBox12i5.Visible = False
        End If
        If MaOC(15, 9) = 0 Then
            PictureBox12i6.Visible = False
        End If
        If MaOC(15, 10) = 0 Then
            PictureBox12i7.Visible = False
        End If
        If MaOC(15, 11) = 0 Then
            PictureBox12i8.Visible = False
        End If
        If MaOC(15, 12) = 0 Then
            PictureBox12i9.Visible = False
        End If
        If MaOC(15, 13) = 0 Then
            PictureBox12i10.Visible = False
        End If
        If MaOC(15, 14) = 0 Then
            PictureBox12i11.Visible = False
        End If
        If MaOC(15, 15) = 0 Then
            PictureBox12i12.Visible = False
        End If
        If MaOC(15, 16) = 0 Then
            PictureBox12i13.Visible = False
        End If
        If MaOC(15, 17) = 0 Then
            PictureBox12i14.Visible = False
        End If
        If MaOC(15, 18) = 0 Then
            PictureBox12i15.Visible = False
        End If
        If MaOC(16, 4) = 0 Then
            PictureBox13i1.Visible = False
        End If
        If MaOC(16, 5) = 0 Then
            PictureBox13i2.Visible = False
        End If
        If MaOC(16, 6) = 0 Then
            PictureBox13i3.Visible = False
        End If
        If MaOC(16, 7) = 0 Then
            PictureBox13i4.Visible = False
        End If
        If MaOC(16, 8) = 0 Then
            PictureBox13i5.Visible = False
        End If
        If MaOC(16, 9) = 0 Then
            PictureBox13i6.Visible = False
        End If
        If MaOC(16, 10) = 0 Then
            PictureBox13i7.Visible = False
        End If
        If MaOC(16, 11) = 0 Then
            PictureBox13i8.Visible = False
        End If
        If MaOC(16, 12) = 0 Then
            PictureBox13i9.Visible = False
        End If
        If MaOC(16, 13) = 0 Then
            PictureBox13i10.Visible = False
        End If
        If MaOC(16, 14) = 0 Then
            PictureBox13i11.Visible = False
        End If
        If MaOC(16, 15) = 0 Then
            PictureBox13i12.Visible = False
        End If
        If MaOC(16, 16) = 0 Then
            PictureBox13i13.Visible = False
        End If
        If MaOC(16, 17) = 0 Then
            PictureBox13i14.Visible = False
        End If
        If MaOC(16, 18) = 0 Then
            PictureBox13i15.Visible = False
        End If

        If MaOC(17, 4) = 0 Then
            PictureBox14i1.Visible = False
        End If
        If MaOC(17, 5) = 0 Then
            PictureBox14i2.Visible = False
        End If
        If MaOC(17, 6) = 0 Then
            PictureBox14i3.Visible = False
        End If
        If MaOC(17, 7) = 0 Then
            PictureBox14i4.Visible = False
        End If
        If MaOC(17, 8) = 0 Then
            PictureBox14i5.Visible = False
        End If
        If MaOC(17, 9) = 0 Then
            PictureBox14i6.Visible = False
        End If
        If MaOC(17, 10) = 0 Then
            PictureBox14i7.Visible = False
        End If
        If MaOC(17, 11) = 0 Then
            PictureBox14i8.Visible = False
        End If
        If MaOC(17, 12) = 0 Then
            PictureBox14i9.Visible = False
        End If
        If MaOC(17, 13) = 0 Then
            PictureBox14i10.Visible = False
        End If
        If MaOC(17, 14) = 0 Then
            PictureBox14i11.Visible = False
        End If
        If MaOC(17, 15) = 0 Then
            PictureBox14i12.Visible = False
        End If
        If MaOC(17, 16) = 0 Then
            PictureBox14i13.Visible = False
        End If
        If MaOC(17, 17) = 0 Then
            PictureBox14i14.Visible = False
        End If
        If MaOC(17, 18) = 0 Then
            PictureBox14i15.Visible = False
        End If

        If MaOC(18, 4) = 0 Then
            PictureBox15i1.Visible = False
        End If
        If MaOC(18, 5) = 0 Then
            PictureBox15i2.Visible = False
        End If
        If MaOC(18, 6) = 0 Then
            PictureBox15i3.Visible = False
        End If
        If MaOC(18, 7) = 0 Then
            PictureBox15i4.Visible = False
        End If
        If MaOC(18, 8) = 0 Then
            PictureBox15i5.Visible = False
        End If
        If MaOC(18, 9) = 0 Then
            PictureBox15i6.Visible = False
        End If
        If MaOC(18, 10) = 0 Then
            PictureBox15i7.Visible = False
        End If
        If MaOC(18, 11) = 0 Then
            PictureBox15i8.Visible = False
        End If
        If MaOC(18, 12) = 0 Then
            PictureBox15i9.Visible = False
        End If
        If MaOC(18, 13) = 0 Then
            PictureBox15i10.Visible = False
        End If
        If MaOC(18, 14) = 0 Then
            PictureBox15i11.Visible = False
        End If
        If MaOC(18, 15) = 0 Then
            PictureBox15i12.Visible = False
        End If
        If MaOC(18, 16) = 0 Then
            PictureBox15i13.Visible = False
        End If
        If MaOC(18, 17) = 0 Then
            PictureBox15i14.Visible = False
        End If
        If MaOC(18, 18) = 0 Then
            PictureBox15i15.Visible = False
        End If

    End Sub

    Private Function c() As String
        Throw New NotImplementedException
    End Function

    Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click

    End Sub
    Sub cou()
        count = count + 1
        Label4.Text = count
    End Sub
   
    Sub chorno()
        If MaOC(4, 4) = 1 Then
            PictureBox1i1.Visible = True
            PictureBox1i1.BackColor = Color.Black
        End If
        If MaOC(4, 5) = 1 Then
            PictureBox1i2.Visible = True
            PictureBox1i2.BackColor = Color.Black
        End If
        If MaOC(4, 6) = 1 Then
            PictureBox1i3.Visible = True
            PictureBox1i3.BackColor = Color.Black
        End If
        If MaOC(4, 7) = 1 Then
            PictureBox1i4.Visible = True
            PictureBox1i4.BackColor = Color.Black
        End If
        If MaOC(4, 8) = 1 Then
            PictureBox1i5.Visible = True
            PictureBox1i5.BackColor = Color.Black
        End If
        If MaOC(4, 9) = 1 Then
            PictureBox1i6.Visible = True
            PictureBox1i6.BackColor = Color.Black
        End If
        If MaOC(4, 10) = 1 Then
            PictureBox1i7.Visible = True
            PictureBox1i7.BackColor = Color.Black
        End If
        If MaOC(4, 11) = 1 Then
            PictureBox1i8.Visible = True
            PictureBox1i8.BackColor = Color.Black
        End If
        If MaOC(4, 12) = 1 Then
            PictureBox1i9.Visible = True
            PictureBox1i9.BackColor = Color.Black
        End If
        If MaOC(4, 13) = 1 Then
            PictureBox1i10.Visible = True
            PictureBox1i10.BackColor = Color.Black
        End If
        If MaOC(4, 14) = 1 Then
            PictureBox1i11.Visible = True
            PictureBox1i11.BackColor = Color.Black
        End If
        If MaOC(4, 15) = 1 Then
            PictureBox1i12.Visible = True
            PictureBox1i12.BackColor = Color.Black
        End If
        If MaOC(4, 16) = 1 Then
            PictureBox1i13.Visible = True
            PictureBox1i13.BackColor = Color.Black
        End If
        If MaOC(4, 17) = 1 Then
            PictureBox1i14.Visible = True
            PictureBox1i14.BackColor = Color.Black
        End If
        If MaOC(4, 18) = 1 Then
            PictureBox1i15.Visible = True
            PictureBox1i15.BackColor = Color.Black
        End If

        If MaOC(5, 4) = 1 Then
            PictureBox2i1.Visible = True
            PictureBox2i1.BackColor = Color.Black
        End If
        If MaOC(5, 5) = 1 Then
            PictureBox2i2.Visible = True
            PictureBox2i2.BackColor = Color.Black
        End If
        If MaOC(5, 6) = 1 Then
            PictureBox2i3.Visible = True
            PictureBox2i3.BackColor = Color.Black
        End If
        If MaOC(5, 7) = 1 Then
            PictureBox2i4.Visible = True
            PictureBox2i4.BackColor = Color.Black
        End If
        If MaOC(5, 8) = 1 Then
            PictureBox2i5.Visible = True
            PictureBox2i5.BackColor = Color.Black
        End If
        If MaOC(5, 9) = 1 Then
            PictureBox2i6.Visible = True
            PictureBox2i6.BackColor = Color.Black
        End If
        If MaOC(5, 10) = 1 Then
            PictureBox2i7.Visible = True
            PictureBox2i7.BackColor = Color.Black
        End If
        If MaOC(5, 11) = 1 Then
            PictureBox2i8.Visible = True
            PictureBox2i8.BackColor = Color.Black
        End If
        If MaOC(5, 12) = 1 Then
            PictureBox2i9.Visible = True
            PictureBox2i9.BackColor = Color.Black
        End If
        If MaOC(5, 13) = 1 Then
            PictureBox2i10.Visible = True
            PictureBox2i10.BackColor = Color.Black
        End If
        If MaOC(5, 14) = 1 Then
            PictureBox2i11.Visible = True
            PictureBox2i11.BackColor = Color.Black
        End If
        If MaOC(5, 15) = 1 Then
            PictureBox2i12.Visible = True
            PictureBox2i12.BackColor = Color.Black
        End If
        If MaOC(5, 16) = 1 Then
            PictureBox2i13.Visible = True
            PictureBox2i13.BackColor = Color.Black
        End If
        If MaOC(5, 17) = 1 Then
            PictureBox2i14.Visible = True
            PictureBox2i14.BackColor = Color.Black
        End If
        If MaOC(5, 18) = 1 Then
            PictureBox2i15.Visible = True
            PictureBox2i15.BackColor = Color.Black
        End If


        If MaOC(6, 4) = 1 Then
            PictureBox3i1.Visible = True
            PictureBox3i1.BackColor = Color.Black
        End If
        If MaOC(6, 5) = 1 Then
            PictureBox3i2.Visible = True
            PictureBox3i2.BackColor = Color.Black
        End If
        If MaOC(6, 6) = 1 Then
            PictureBox3i3.Visible = True
            PictureBox3i3.BackColor = Color.Black
        End If
        If MaOC(6, 7) = 1 Then
            PictureBox3i4.Visible = True
            PictureBox3i4.BackColor = Color.Black
        End If
        If MaOC(6, 8) = 1 Then
            PictureBox3i5.Visible = True
            PictureBox3i5.BackColor = Color.Black
        End If
        If MaOC(6, 9) = 1 Then
            PictureBox3i6.Visible = True
            PictureBox3i6.BackColor = Color.Black
        End If
        If MaOC(6, 10) = 1 Then
            PictureBox3i7.Visible = True
            PictureBox3i7.BackColor = Color.Black
        End If
        If MaOC(6, 11) = 1 Then
            PictureBox3i8.Visible = True
            PictureBox3i8.BackColor = Color.Black
        End If
        If MaOC(6, 12) = 1 Then
            PictureBox3i9.Visible = True
            PictureBox3i9.BackColor = Color.Black
        End If
        If MaOC(6, 13) = 1 Then
            PictureBox3i10.Visible = True
            PictureBox3i10.BackColor = Color.Black
        End If
        If MaOC(6, 14) = 1 Then
            PictureBox3i11.Visible = True
            PictureBox3i11.BackColor = Color.Black
        End If
        If MaOC(6, 15) = 1 Then
            PictureBox3i12.Visible = True
            PictureBox3i12.BackColor = Color.Black
        End If
        If MaOC(6, 16) = 1 Then
            PictureBox3i13.Visible = True
            PictureBox3i13.BackColor = Color.Black
        End If
        If MaOC(6, 17) = 1 Then
            PictureBox3i14.Visible = True
            PictureBox3i14.BackColor = Color.Black
        End If
        If MaOC(6, 18) = 1 Then
            PictureBox3i15.Visible = True
            PictureBox3i15.BackColor = Color.Black
        End If



        If MaOC(7, 4) = 1 Then
            PictureBox4i1.Visible = True
            PictureBox4i1.BackColor = Color.Black
        End If
        If MaOC(7, 5) = 1 Then
            PictureBox4i2.Visible = True
            PictureBox4i2.BackColor = Color.Black
        End If
        If MaOC(7, 6) = 1 Then
            PictureBox4i3.Visible = True
            PictureBox4i3.BackColor = Color.Black
        End If
        If MaOC(7, 7) = 1 Then
            PictureBox4i4.Visible = True
            PictureBox4i4.BackColor = Color.Black
        End If
        If MaOC(7, 8) = 1 Then
            PictureBox4i5.Visible = True
            PictureBox4i5.BackColor = Color.Black
        End If
        If MaOC(7, 9) = 1 Then
            PictureBox4i6.Visible = True
            PictureBox4i6.BackColor = Color.Black
        End If
        If MaOC(7, 10) = 1 Then
            PictureBox4i7.Visible = True
            PictureBox4i7.BackColor = Color.Black
        End If
        If MaOC(7, 11) = 1 Then
            PictureBox4i8.Visible = True
            PictureBox4i8.BackColor = Color.Black
        End If
        If MaOC(7, 12) = 1 Then
            PictureBox4i9.Visible = True
            PictureBox4i9.BackColor = Color.Black
        End If
        If MaOC(7, 13) = 1 Then
            PictureBox4i10.Visible = True
            PictureBox4i10.BackColor = Color.Black
        End If
        If MaOC(7, 14) = 1 Then
            PictureBox4i11.Visible = True
            PictureBox4i11.BackColor = Color.Black
        End If
        If MaOC(7, 15) = 1 Then
            PictureBox4i12.Visible = True
            PictureBox4i12.BackColor = Color.Black
        End If
        If MaOC(7, 16) = 1 Then
            PictureBox4i13.Visible = True
            PictureBox4i13.BackColor = Color.Black
        End If
        If MaOC(7, 17) = 1 Then
            PictureBox4i14.Visible = True
            PictureBox4i14.BackColor = Color.Black
        End If
        If MaOC(7, 18) = 1 Then
            PictureBox4i15.Visible = True
            PictureBox4i15.BackColor = Color.Black
        End If



        If MaOC(8, 4) = 1 Then
            PictureBox5i1.Visible = True
            PictureBox5i1.BackColor = Color.Black
        End If
        If MaOC(8, 5) = 1 Then
            PictureBox5i2.Visible = True
            PictureBox5i2.BackColor = Color.Black
        End If
        If MaOC(8, 6) = 1 Then
            PictureBox5i3.Visible = True
            PictureBox5i3.BackColor = Color.Black
        End If
        If MaOC(8, 7) = 1 Then
            PictureBox5i4.Visible = True
            PictureBox5i4.BackColor = Color.Black
        End If
        If MaOC(8, 8) = 1 Then
            PictureBox5i5.Visible = True
            PictureBox5i5.BackColor = Color.Black
        End If
        If MaOC(8, 9) = 1 Then
            PictureBox5i6.Visible = True
            PictureBox5i6.BackColor = Color.Black
        End If
        If MaOC(8, 10) = 1 Then
            PictureBox5i7.Visible = True
            PictureBox5i7.BackColor = Color.Black
        End If
        If MaOC(8, 11) = 1 Then
            PictureBox5i8.Visible = True
            PictureBox5i8.BackColor = Color.Black
        End If
        If MaOC(8, 12) = 1 Then
            PictureBox5i9.Visible = True
            PictureBox5i9.BackColor = Color.Black
        End If
        If MaOC(8, 13) = 1 Then
            PictureBox5i10.Visible = True
            PictureBox5i10.BackColor = Color.Black
        End If
        If MaOC(8, 14) = 1 Then
            PictureBox5i11.Visible = True
            PictureBox5i11.BackColor = Color.Black
        End If
        If MaOC(8, 15) = 1 Then
            PictureBox5i12.Visible = True
            PictureBox5i12.BackColor = Color.Black
        End If
        If MaOC(8, 16) = 1 Then
            PictureBox5i13.Visible = True
            PictureBox5i13.BackColor = Color.Black
        End If
        If MaOC(8, 17) = 1 Then
            PictureBox5i14.Visible = True
            PictureBox5i14.BackColor = Color.Black
        End If
        If MaOC(8, 18) = 1 Then
            PictureBox5i15.Visible = True
            PictureBox5i15.BackColor = Color.Black
        End If




        If MaOC(9, 4) = 1 Then
            PictureBox6i1.Visible = True
            PictureBox6i1.BackColor = Color.Black
        End If
        If MaOC(9, 5) = 1 Then
            PictureBox6i2.Visible = True
            PictureBox6i2.BackColor = Color.Black
        End If
        If MaOC(9, 6) = 1 Then
            PictureBox6i3.Visible = True
            PictureBox6i3.BackColor = Color.Black
        End If
        If MaOC(9, 7) = 1 Then
            PictureBox6i4.Visible = True
            PictureBox6i4.BackColor = Color.Black
        End If
        If MaOC(9, 8) = 1 Then
            PictureBox6i5.Visible = True
            PictureBox6i5.BackColor = Color.Black
        End If
        If MaOC(9, 9) = 1 Then
            PictureBox6i6.Visible = True
            PictureBox6i6.BackColor = Color.Black
        End If
        If MaOC(9, 10) = 1 Then
            PictureBox6i7.Visible = True
            PictureBox6i7.BackColor = Color.Black
        End If
        If MaOC(9, 11) = 1 Then
            PictureBox6i8.Visible = True
            PictureBox6i8.BackColor = Color.Black
        End If
        If MaOC(9, 12) = 1 Then
            PictureBox6i9.Visible = True
            PictureBox6i9.BackColor = Color.Black
        End If
        If MaOC(9, 13) = 1 Then
            PictureBox6i10.Visible = True
            PictureBox6i10.BackColor = Color.Black
        End If
        If MaOC(9, 14) = 1 Then
            PictureBox6i11.Visible = True
            PictureBox6i11.BackColor = Color.Black
        End If
        If MaOC(9, 15) = 1 Then
            PictureBox6i12.Visible = True
            PictureBox6i12.BackColor = Color.Black
        End If
        If MaOC(9, 16) = 1 Then
            PictureBox6i13.Visible = True
            PictureBox6i13.BackColor = Color.Black
        End If
        If MaOC(9, 17) = 1 Then
            PictureBox6i14.Visible = True
            PictureBox6i14.BackColor = Color.Black
        End If
        If MaOC(9, 18) = 1 Then
            PictureBox6i15.Visible = True
            PictureBox6i15.BackColor = Color.Black
        End If




        If MaOC(10, 4) = 1 Then
            PictureBox7i1.Visible = True
            PictureBox7i1.BackColor = Color.Black
        End If
        If MaOC(10, 5) = 1 Then
            PictureBox7i2.Visible = True
            PictureBox7i2.BackColor = Color.Black
        End If
        If MaOC(10, 6) = 1 Then
            PictureBox7i3.Visible = True
            PictureBox7i3.BackColor = Color.Black
        End If
        If MaOC(10, 7) = 1 Then
            PictureBox7i4.Visible = True
            PictureBox7i4.BackColor = Color.Black
        End If
        If MaOC(10, 8) = 1 Then
            PictureBox7i5.Visible = True
            PictureBox7i5.BackColor = Color.Black
        End If
        If MaOC(10, 9) = 1 Then
            PictureBox7i6.Visible = True
            PictureBox7i6.BackColor = Color.Black
        End If
        If MaOC(10, 10) = 1 Then
            PictureBox7i7.Visible = True
            PictureBox7i7.BackColor = Color.Black
        End If
        If MaOC(10, 11) = 1 Then
            PictureBox7i8.Visible = True
            PictureBox7i8.BackColor = Color.Black
        End If
        If MaOC(10, 12) = 1 Then
            PictureBox7i9.Visible = True
            PictureBox7i9.BackColor = Color.Black
        End If
        If MaOC(10, 13) = 1 Then
            PictureBox7i10.Visible = True
            PictureBox7i10.BackColor = Color.Black
        End If
        If MaOC(10, 14) = 1 Then
            PictureBox7i11.Visible = True
            PictureBox7i11.BackColor = Color.Black
        End If
        If MaOC(10, 15) = 1 Then
            PictureBox7i12.Visible = True
            PictureBox7i12.BackColor = Color.Black
        End If
        If MaOC(10, 16) = 1 Then
            PictureBox7i13.Visible = True
            PictureBox7i13.BackColor = Color.Black
        End If
        If MaOC(10, 17) = 1 Then
            PictureBox7i14.Visible = True
            PictureBox7i14.BackColor = Color.Black
        End If
        If MaOC(10, 18) = 1 Then
            PictureBox7i15.Visible = True
            PictureBox7i15.BackColor = Color.Black
        End If




        If MaOC(11, 4) = 1 Then
            PictureBox8i1.Visible = True
            PictureBox8i1.BackColor = Color.Black
        End If
        If MaOC(11, 5) = 1 Then
            PictureBox8i2.Visible = True
            PictureBox8i2.BackColor = Color.Black
        End If
        If MaOC(11, 6) = 1 Then
            PictureBox8i3.Visible = True
            PictureBox8i3.BackColor = Color.Black
        End If
        If MaOC(11, 7) = 1 Then
            PictureBox8i4.Visible = True
            PictureBox8i4.BackColor = Color.Black
        End If
        If MaOC(11, 8) = 1 Then
            PictureBox8i5.Visible = True
            PictureBox8i5.BackColor = Color.Black
        End If
        If MaOC(11, 9) = 1 Then
            PictureBox8i6.Visible = True
            PictureBox8i6.BackColor = Color.Black
        End If
        If MaOC(11, 10) = 1 Then
            PictureBox8i7.Visible = True
            PictureBox8i7.BackColor = Color.Black
        End If
        If MaOC(11, 11) = 1 Then
            PictureBox8i8.Visible = True
            PictureBox8i8.BackColor = Color.Black
        End If
        If MaOC(11, 12) = 1 Then
            PictureBox8i9.Visible = True
            PictureBox8i9.BackColor = Color.Black
        End If
        If MaOC(11, 13) = 1 Then
            PictureBox8i10.Visible = True
            PictureBox8i10.BackColor = Color.Black
        End If
        If MaOC(11, 14) = 1 Then
            PictureBox8i11.Visible = True
            PictureBox8i11.BackColor = Color.Black
        End If
        If MaOC(11, 15) = 1 Then
            PictureBox8i12.Visible = True
            PictureBox8i12.BackColor = Color.Black
        End If
        If MaOC(11, 16) = 1 Then
            PictureBox8i13.Visible = True
            PictureBox8i13.BackColor = Color.Black
        End If
        If MaOC(11, 17) = 1 Then
            PictureBox8i14.Visible = True
            PictureBox8i14.BackColor = Color.Black
        End If
        If MaOC(11, 18) = 1 Then
            PictureBox8i15.Visible = True
            PictureBox8i15.BackColor = Color.Black
        End If



        If MaOC(12, 4) = 1 Then
            PictureBox9i1.Visible = True
            PictureBox9i1.BackColor = Color.Black
        End If
        If MaOC(12, 5) = 1 Then
            PictureBox9i2.Visible = True
            PictureBox9i2.BackColor = Color.Black
        End If
        If MaOC(12, 6) = 1 Then
            PictureBox9i3.Visible = True
            PictureBox9i3.BackColor = Color.Black
        End If
        If MaOC(12, 7) = 1 Then
            PictureBox9i4.Visible = True
            PictureBox9i4.BackColor = Color.Black
        End If
        If MaOC(12, 8) = 1 Then
            PictureBox9i5.Visible = True
            PictureBox9i5.BackColor = Color.Black
        End If
        If MaOC(12, 9) = 1 Then
            PictureBox9i6.Visible = True
            PictureBox9i6.BackColor = Color.Black
        End If
        If MaOC(12, 10) = 1 Then
            PictureBox9i7.Visible = True
            PictureBox9i7.BackColor = Color.Black
        End If
        If MaOC(12, 11) = 1 Then
            PictureBox9i8.Visible = True
            PictureBox9i8.BackColor = Color.Black
        End If
        If MaOC(12, 12) = 1 Then
            PictureBox9i9.Visible = True
            PictureBox9i9.BackColor = Color.Black
        End If
        If MaOC(12, 13) = 1 Then
            PictureBox9i10.Visible = True
            PictureBox9i10.BackColor = Color.Black
        End If
        If MaOC(12, 14) = 1 Then
            PictureBox9i11.Visible = True
            PictureBox9i11.BackColor = Color.Black
        End If
        If MaOC(12, 15) = 1 Then
            PictureBox9i12.Visible = True
            PictureBox9i12.BackColor = Color.Black
        End If
        If MaOC(12, 16) = 1 Then
            PictureBox9i13.Visible = True
            PictureBox9i13.BackColor = Color.Black
        End If
        If MaOC(12, 17) = 1 Then
            PictureBox9i14.Visible = True
            PictureBox9i14.BackColor = Color.Black
        End If
        If MaOC(12, 18) = 1 Then
            PictureBox9i15.Visible = True
            PictureBox9i15.BackColor = Color.Black
        End If





        If MaOC(13, 4) = 1 Then
            PictureBox10i1.Visible = True
            PictureBox10i1.BackColor = Color.Black
        End If
        If MaOC(13, 5) = 1 Then
            PictureBox10i2.Visible = True
            PictureBox10i2.BackColor = Color.Black
        End If
        If MaOC(13, 6) = 1 Then
            PictureBox10i3.Visible = True
            PictureBox10i3.BackColor = Color.Black
        End If
        If MaOC(13, 7) = 1 Then
            PictureBox10i4.Visible = True
            PictureBox10i4.BackColor = Color.Black
        End If
        If MaOC(13, 8) = 1 Then
            PictureBox10i5.Visible = True
            PictureBox10i5.BackColor = Color.Black
        End If
        If MaOC(13, 9) = 1 Then
            PictureBox10i6.Visible = True
            PictureBox10i6.BackColor = Color.Black
        End If
        If MaOC(13, 10) = 1 Then
            PictureBox10i7.Visible = True
            PictureBox10i7.BackColor = Color.Black
        End If
        If MaOC(13, 11) = 1 Then
            PictureBox10i8.Visible = True
            PictureBox10i8.BackColor = Color.Black
        End If
        If MaOC(13, 12) = 1 Then
            PictureBox10i9.Visible = True
            PictureBox10i9.BackColor = Color.Black
        End If
        If MaOC(13, 13) = 1 Then
            PictureBox10i10.Visible = True
            PictureBox10i10.BackColor = Color.Black
        End If
        If MaOC(13, 14) = 1 Then
            PictureBox10i11.Visible = True
            PictureBox10i11.BackColor = Color.Black
        End If
        If MaOC(13, 15) = 1 Then
            PictureBox10i12.Visible = True
            PictureBox10i12.BackColor = Color.Black
        End If
        If MaOC(13, 16) = 1 Then
            PictureBox10i13.Visible = True
            PictureBox10i13.BackColor = Color.Black
        End If
        If MaOC(13, 17) = 1 Then
            PictureBox10i14.Visible = True
            PictureBox10i14.BackColor = Color.Black
        End If
        If MaOC(13, 18) = 1 Then
            PictureBox10i15.Visible = True
            PictureBox10i15.BackColor = Color.Black
        End If




        If MaOC(14, 4) = 1 Then
            PictureBox11i1.Visible = True
            PictureBox11i1.BackColor = Color.Black
        End If
        If MaOC(14, 5) = 1 Then
            PictureBox11i2.Visible = True
            PictureBox11i2.BackColor = Color.Black
        End If
        If MaOC(14, 6) = 1 Then
            PictureBox11i3.Visible = True
            PictureBox11i3.BackColor = Color.Black
        End If
        If MaOC(14, 7) = 1 Then
            PictureBox11i4.Visible = True
            PictureBox11i4.BackColor = Color.Black
        End If
        If MaOC(14, 8) = 1 Then
            PictureBox11i5.Visible = True
            PictureBox11i5.BackColor = Color.Black
        End If
        If MaOC(14, 9) = 1 Then
            PictureBox11i6.Visible = True
            PictureBox11i6.BackColor = Color.Black
        End If
        If MaOC(14, 10) = 1 Then
            PictureBox11i7.Visible = True
            PictureBox11i7.BackColor = Color.Black
        End If
        If MaOC(14, 11) = 1 Then
            PictureBox11i8.Visible = True
            PictureBox11i8.BackColor = Color.Black
        End If
        If MaOC(14, 12) = 1 Then
            PictureBox11i9.Visible = True
            PictureBox11i9.BackColor = Color.Black
        End If
        If MaOC(14, 13) = 1 Then
            PictureBox11i10.Visible = True
            PictureBox11i10.BackColor = Color.Black
        End If
        If MaOC(14, 14) = 1 Then
            PictureBox11i11.Visible = True
            PictureBox11i11.BackColor = Color.Black
        End If
        If MaOC(14, 15) = 1 Then
            PictureBox11i12.Visible = True
            PictureBox11i12.BackColor = Color.Black
        End If
        If MaOC(14, 16) = 1 Then
            PictureBox11i13.Visible = True
            PictureBox11i13.BackColor = Color.Black
        End If
        If MaOC(14, 17) = 1 Then
            PictureBox11i14.Visible = True
            PictureBox11i14.BackColor = Color.Black
        End If
        If MaOC(14, 18) = 1 Then
            PictureBox11i15.Visible = True
            PictureBox11i15.BackColor = Color.Black
        End If




        If MaOC(15, 4) = 1 Then
            PictureBox12i1.Visible = True
            PictureBox12i1.BackColor = Color.Black
        End If
        If MaOC(15, 5) = 1 Then
            PictureBox12i2.Visible = True
            PictureBox12i2.BackColor = Color.Black
        End If
        If MaOC(15, 6) = 1 Then
            PictureBox12i3.Visible = True
            PictureBox12i3.BackColor = Color.Black
        End If
        If MaOC(15, 7) = 1 Then
            PictureBox12i4.Visible = True
            PictureBox12i4.BackColor = Color.Black
        End If
        If MaOC(15, 8) = 1 Then
            PictureBox12i5.Visible = True
            PictureBox12i5.BackColor = Color.Black
        End If
        If MaOC(15, 9) = 1 Then
            PictureBox12i6.Visible = True
            PictureBox12i6.BackColor = Color.Black
        End If
        If MaOC(15, 10) = 1 Then
            PictureBox12i7.Visible = True
            PictureBox12i7.BackColor = Color.Black
        End If
        If MaOC(15, 11) = 1 Then
            PictureBox12i8.Visible = True
            PictureBox12i8.BackColor = Color.Black
        End If
        If MaOC(15, 12) = 1 Then
            PictureBox12i9.Visible = True
            PictureBox12i9.BackColor = Color.Black
        End If
        If MaOC(15, 13) = 1 Then
            PictureBox12i10.Visible = True
            PictureBox12i10.BackColor = Color.Black
        End If
        If MaOC(15, 14) = 1 Then
            PictureBox12i11.Visible = True
            PictureBox12i11.BackColor = Color.Black
        End If
        If MaOC(15, 15) = 1 Then
            PictureBox12i12.Visible = True
            PictureBox12i12.BackColor = C

以上是关于MaOC五子棋源码的主要内容,如果未能解决你的问题,请参考以下文章

源码分享iOS-OC版五子棋

五子棋 源码

五子棋 源码

五子棋游戏(简单易懂,入门都能学)

MaOC线代使用方法介绍

五子棋AI算法-Zobrist