- 最後登錄
- 2024-11-14
- 在線時間
- 2806 小時
- 註冊時間
- 2013-5-18
- 閱讀權限
- 20
- 精華
- 0
- UID
- 13068892
- 帖子
- 1700
- 積分
- 174 點
- 潛水值
- 46080 米
| 若新密碼無法使用,可能是數據未更新。請使用舊密碼看看。 本帖最後由 zxc693491 於 2016-12-1 03:42 PM 編輯
自己做的井字遊戲AI 請大家幫我測試看看,希望能找到錯誤,原則上不可能贏他就是了。
另外這是雙人版(做得很難看消磨時間用:
以下提供參考,我用按鈕物件寫的"VB2010"
- [/backcolor]Public Class 井字遊戲
- Dim time As Integer
- Dim att As Integer '狀況標記
- Dim cheak As Boolean = False '是否已判斷勝負
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- MsgBox("歡迎遊玩井字遊戲,退出請按鍵盤Alt+F4鍵", vbOKOnly, "")
- N()
- S()
- Me.Focus()
- FormBorderStyle = Windows.Forms.FormBorderStyle.None
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Button1.Text = "○"
- Button1.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Button2.Text = "○"
- Button2.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Button3.Text = "○"
- Button3.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- Button4.Text = "○"
- Button4.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- Button5.Text = "○"
- Button5.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
- Button6.Text = "○"
- Button6.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
- Button7.Text = "○"
- Button7.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
- Button8.Text = "○"
- Button8.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
- Button9.Text = "○"
- Button9.Enabled = False
- time = time + 1
- If att = 22 Then
- time = 3
- End If
- AI()
- End Sub '按鈕群
- '======================================================================================================================
- Sub S()
- If MsgBox("是否先下?", MsgBoxStyle.YesNo, "順序") = MsgBoxResult.No Then
- AIstep1()
- Else
- N()
- End If
- cheak = False
- End Sub '開始
- Sub N() '復原
- Button1.Enabled = True
- Button2.Enabled = True
- Button3.Enabled = True
- Button4.Enabled = True
- Button5.Enabled = True
- Button6.Enabled = True
- Button7.Enabled = True
- Button8.Enabled = True
- Button9.Enabled = True
- Button1.Text = ""
- Button2.Text = ""
- Button3.Text = ""
- Button4.Text = ""
- Button5.Text = ""
- Button6.Text = ""
- Button7.Text = ""
- Button8.Text = ""
- Button9.Text = ""
- att = 1
- time = 1
- End Sub '初始化
- Sub AI()
- WinCheak()
- If cheak = True Then
- cheak = False
- Exit Sub
- End If
- If time = 2 Then
- AIstep2()
- Exit Sub
- End If
- If time = 3 Then
- AIstep3()
- Exit Sub
- End If
- If time = 4 Then
- AIstep4()
- Exit Sub
- End If
- If time = 5 Then
- AIstep5()
- Exit Sub
- End If
- If time = 6 Then
- AIstep6()
- Exit Sub
- End If
- If time = 7 Then
- AIstep7()
- Exit Sub
- End If
- If time = 8 Then
- AIstep8()
- Exit Sub
- End If
- If time = 9 Then
- AIstep9()
- Exit Sub
- End If
- End Sub '步數判斷
- Sub AIstep1() '先攻搶角
- Button3.Text = "X"
- Button3.Enabled = False
- time = 2
- att = 22
- End Sub
- Sub AIstep2()
- If Button1.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 1
- ElseIf Button2.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 0
- ElseIf Button3.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 1
- ElseIf Button4.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 0
- ElseIf Button5.Text = "○" Then
- Button3.Text = "X"
- Button3.Enabled = False
- att = 0
- ElseIf Button6.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 43
- ElseIf Button7.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 1
- ElseIf Button8.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 43
- ElseIf Button9.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 1
- End If
- time = 3
- End Sub
- Sub AIstep3() '開二路
- If Button1.Text = "○" Then
- Button9.Text = "X"
- Button9.Enabled = False
- att = 1
- End If
- If Button2.Text = "○" Then
- Button9.Text = "X"
- Button9.Enabled = False
- att = 2
- End If
- If Button4.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 4
- End If
- If Button5.Text = "○" Then
- Button7.Text = "X"
- Button7.Enabled = False
- att = 5
- End If
- If Button6.Text = "○" Then
- Button1.Text = "X"
- Button1.Enabled = False
- att = 6
- End If
- If Button7.Text = "○" Then
- Button9.Text = "X"
- Button9.Enabled = False
- att = 7
- End If
- If Button8.Text = "○" Then
- Button5.Text = "X"
- Button5.Enabled = False
- att = 8
- End If
- If Button9.Text = "○" Then
- Button1.Text = "X"
- Button1.Enabled = False
- att = 9
- End If
- time = 4
- End Sub
- Sub AIstep4()
- If att = 0 Then
- If (Button2.Enabled = False And Button8.Enabled = False) Or (Button4.Enabled = False And Button6.Enabled = False) Then
- Button1.Text = "X"
- Button1.Enabled = False
- time = 5
- Exit Sub
- End If
- AI2()
- ElseIf att = 1 Then
- If (Button1.Enabled = False And Button9.Enabled = False) Or (Button3.Enabled = False And Button7.Enabled = False) Then
- Button2.Text = "X"
- Button2.Enabled = False
- time = 5
- Exit Sub
- Else
- AI2()
- End If
- ElseIf att = 43 Then
- If Button4.Text = "○" And Button8.Text = "○" Then
- Button7.Text = "X"
- Button7.Enabled = False
- Else
- Button3.Text = "X"
- Button3.Enabled = False
- End If
- End If
- time = 5
- End Sub
- Sub AIstep5()
- If att = 1 Then
- If Button6.Text = "○" Then
- Button7.Text = "X"
- Button7.Enabled = False
- Else
- Button6.Text = "X"
- Button6.Enabled = False
- End If
- ElseIf att = 2 Then
- If Button6.Text = "○" Then
- Button7.Text = "X"
- Button7.Enabled = False
- Else
- Button6.Text = "X"
- Button6.Enabled = False
- End If
- ElseIf att = 4 Then
- If Button7.Text = "○" Then
- Button1.Text = "X"
- Button1.Enabled = False
- Else
- Button7.Text = "X"
- Button7.Enabled = False
- End If
- ElseIf att = 5 Then
- If Button1.Text = "○" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button9.Text = "○" Then
- Button1.Text = "X"
- Button1.Enabled = False
- Else
- If Button2.Text = "○" Then
- Button8.Text = "X"
- Button8.Enabled = False
- att = 9
- ElseIf Button4.Text = "○" Then
- Button6.Text = "X"
- Button6.Enabled = False
- att = 9
- ElseIf Button6.Text = "○" Then
- Button4.Text = "X"
- Button4.Enabled = False
- att = 1
- ElseIf Button8.Text = "○" Then
- Button2.Text = "X"
- Button2.Enabled = False
- att = 1
- End If
- End If
- ElseIf att = 6 Then
- If Button2.Enabled = False Then
- Button7.Text = "X"
- Button7.Enabled = False
- Else
- Button2.Text = "X"
- Button2.Enabled = False
- End If
- ElseIf att = 7 Then
- If Button6.Enabled = False Then
- Button1.Text = "X"
- Button1.Enabled = False
- Else
- Button6.Text = "X"
- Button6.Enabled = False
- End If
- ElseIf att = 8 Then
- If Button7.Enabled = False Then
- Button9.Text = "X"
- Button9.Enabled = False
- Else
- Button7.Text = "X"
- Button7.Enabled = False
- End If
- ElseIf att = 9 Then
- If Button2.Enabled = False Then
- Button7.Text = "X"
- Button7.Enabled = False
- Else
- Button2.Text = "X"
- Button2.Enabled = False
- End If
- End If
- time = 6
- WinCheak()
- If cheak = True Then
- N()
- S()
- End If
- End Sub
- Sub AIstep6()
- AI3()
- If cheak = True Then
- N()
- S()
- Exit Sub
- End If
- AI5()
- time = 7
- If att = 99 Then
- Exit Sub
- End If
- AI2()
- End Sub
- Sub AIstep7()
- AI3()
- If cheak = True Then
- N()
- S()
- Exit Sub
- End If
- AI2()
- time = 8
- WinCheak()
- If cheak = True Then
- N()
- S()
- End If
- End Sub
- Sub AIstep8()
- att = 1
- AI3()
- If cheak = True Then
- N()
- S()
- Exit Sub
- End If
- AI2()
- If att = 96 Then
- time = 9
- WinCheak()
- If cheak = True Then
- N()
- S()
- End If
- Exit Sub
- End If
- If Button2.Enabled = True Then
- Button2.Text = "X"
- Button2.Enabled = False
- att = 97
- ElseIf Button4.Enabled = True Then
- Button4.Text = "X"
- Button4.Enabled = False
- att = 97
- ElseIf Button6.Enabled = True Then
- Button6.Text = "X"
- Button6.Enabled = False
- att = 97
- ElseIf Button8.Enabled = True Then
- Button8.Text = "X"
- Button8.Enabled = False
- att = 97
- End If
- If att = 97 Then
- time = 9
- WinCheak()
- If cheak = True Then
- N()
- S()
- End If
- Exit Sub
- End If
- WinCheak()
- If cheak = True Then
- N()
- S()
- Else
- time = 9
- End If
- End Sub
- Sub AIstep9()
- AI3()
- If cheak = True Then
- N()
- S()
- Exit Sub
- End If
- AI2()
- If att = 96 Then
- time = 10
- WinCheak()
- If cheak = True Then
- N()
- S()
- End If
- Exit Sub
- End If
- If (Button2.Text = "X" Or Button4.Text = "X") And Button1.Enabled = True Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf (Button2.Text = "X" Or Button4.Text = "X") And Button9.Enabled = True Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button1.Enabled = False And Button9.Enabled = False Then
- If Button2.Enabled = True Then
- Button2.Text = "X"
- Button2.Enabled = False
- ElseIf Button4.Enabled = True Then
- Button4.Text = "X"
- Button4.Enabled = False
- ElseIf Button6.Enabled = True Then
- Button6.Text = "X"
- Button6.Enabled = False
- ElseIf Button8.Enabled = True Then
- Button8.Text = "X"
- Button8.Enabled = False
- ElseIf Button7.Enabled = True Then
- Button7.Text = "X"
- Button7.Enabled = False
- End If
- Else
- If Button1.Enabled = True Then
- Button1.Text = "X"
- Button1.Enabled = False
- Else
- Button9.Text = "X"
- Button9.Enabled = True
- End If
- End If
- WinCheak()
- If cheak = True Then
- N()
- S()
- Else
- MsgBox("平手囉", MsgBoxStyle.OkOnly, "勝負判斷")
- N()
- S()
- End If
- End Sub
- Sub WinCheak()
- If Button1.Text = Button2.Text And Button1.Text = Button3.Text And Button1.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button4.Text = Button5.Text And Button4.Text = Button6.Text And Button4.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button7.Text = Button8.Text And Button7.Text = Button9.Text And Button7.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button1.Text = Button4.Text And Button1.Text = Button7.Text And Button1.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button2.Text = Button5.Text And Button2.Text = Button8.Text And Button2.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button3.Text = Button6.Text And Button3.Text = Button9.Text And Button3.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button1.Text = Button5.Text And Button1.Text = Button9.Text And Button1.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf Button3.Text = Button5.Text And Button3.Text = Button7.Text And Button3.Text <> "" Then
- MsgBox("你輸了", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- ElseIf time = 10 Then
- MsgBox("平手囉", MsgBoxStyle.OkOnly, "勝負判斷")
- cheak = True
- N()
- S()
- End If
- End Sub '勝負判斷
- '準則:能贏先下,其次阻止連線,以上沒有問題時尋找最有利位置下。
- Sub AI2()
- If Button1.Text = "○" And Button2.Text = "○" And Button3.Text = "" Then
- Button3.Text = "X"
- Button3.Enabled = False
- ElseIf Button1.Text = "○" And Button3.Text = "○" And Button2.Text = "" Then
- Button2.Text = "X"
- Button2.Enabled = False
- ElseIf Button2.Text = "○" And Button3.Text = "○" And Button1.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button4.Text = "○" And Button5.Text = "○" And Button6.Text = "" Then
- Button6.Text = "X"
- Button6.Enabled = False
- ElseIf Button4.Text = "○" And Button6.Text = "○" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "○" And Button6.Text = "○" And Button4.Text = "" Then
- Button4.Text = "X"
- Button4.Enabled = False
- ElseIf Button7.Text = "○" And Button8.Text = "○" And Button9.Text = "" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button7.Text = "○" And Button9.Text = "○" And Button8.Text = "" Then
- Button8.Text = "X"
- Button8.Enabled = False
- ElseIf Button8.Text = "○" And Button9.Text = "○" And Button7.Text = "" Then
- Button7.Text = "X"
- Button7.Enabled = False
- ElseIf Button1.Text = "○" And Button4.Text = "○" And Button7.Text = "" Then
- Button7.Text = "X"
- Button7.Enabled = False
- ElseIf Button1.Text = "○" And Button7.Text = "○" And Button4.Text = "" Then
- Button4.Text = "X"
- Button4.Enabled = False
- ElseIf Button4.Text = "○" And Button7.Text = "○" And Button1.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button2.Text = "○" And Button5.Text = "○" And Button8.Text = "" Then
- Button8.Text = "X"
- Button8.Enabled = False
- ElseIf Button2.Text = "○" And Button8.Text = "○" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "○" And Button8.Text = "○" And Button2.Text = "" Then
- Button2.Text = "X"
- Button2.Enabled = False
- ElseIf Button3.Text = "○" And Button6.Text = "○" And Button9.Text = "" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button3.Text = "○" And Button9.Text = "○" And Button6.Text = "" Then
- Button6.Text = "X"
- Button6.Enabled = False
- ElseIf Button6.Text = "○" And Button9.Text = "○" And Button3.Text = "" Then
- Button3.Text = "X"
- Button3.Enabled = False
- ElseIf Button1.Text = "○" And Button5.Text = "○" And Button9.Text = "" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button1.Text = "○" And Button9.Text = "○" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "○" And Button9.Text = "○" And Button1.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button3.Text = "○" And Button5.Text = "○" And Button7.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button3.Text = "○" And Button7.Text = "○" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "○" And Button7.Text = "○" And Button3.Text = "" Then
- Button3.Text = "X"
- Button3.Enabled = False
- Else
- AI4() '找不到防禦目標
- End If
- att = 96 'step8.9特殊狀況
- End Sub '防禦
- Sub AI3()
- If Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "" Then
- Button3.Text = "X"
- Button3.Enabled = False
- ElseIf Button1.Text = "X" And Button3.Text = "X" And Button2.Text = "" Then
- Button2.Text = "X"
- Button2.Enabled = False
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button1.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "" Then
- Button6.Text = "X"
- Button6.Enabled = False
- ElseIf Button4.Text = "X" And Button6.Text = "X" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button4.Text = "" Then
- Button4.Text = "X"
- Button4.Enabled = False
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button7.Text = "X" And Button9.Text = "X" And Button8.Text = "" Then
- Button8.Text = "X"
- Button8.Enabled = False
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button7.Text = "" Then
- Button7.Text = "X"
- Button7.Enabled = False
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "" Then
- Button7.Text = "X"
- Button7.Enabled = False
- ElseIf Button1.Text = "X" And Button7.Text = "X" And Button4.Text = "" Then
- Button4.Text = "X"
- Button4.Enabled = False
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button1.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "" Then
- Button8.Text = "X"
- Button8.Enabled = False
- ElseIf Button2.Text = "X" And Button8.Text = "X" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "X" And Button8.Text = "X" And Button2.Text = "" Then
- Button2.Text = "X"
- Button2.Enabled = False
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button3.Text = "X" And Button9.Text = "X" And Button6.Text = "" Then
- Button6.Text = "X"
- Button6.Enabled = False
- ElseIf Button6.Text = "X" And Button9.Text = "X" And Button3.Text = "" Then
- Button3.Text = "X"
- Button3.Enabled = False
- ElseIf Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "" Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button1.Text = "X" And Button9.Text = "X" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "X" And Button9.Text = "X" And Button1.Text = "" Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "" Then
- Button7.Text = "X"
- Button7.Enabled = False
- ElseIf Button3.Text = "X" And Button7.Text = "X" And Button5.Text = "" Then
- Button5.Text = "X"
- Button5.Enabled = False
- ElseIf Button5.Text = "X" And Button7.Text = "X" And Button3.Text = "" Then
- Button3.Text = "X"
- Button3.Enabled = False
- End If
- WinCheak()
- End Sub '勝利
- Sub AI4()
- If Button1.Enabled = True Then
- Button1.Text = "X"
- Button1.Enabled = False
- ElseIf Button7.Enabled = True Then
- Button7.Text = "X"
- Button7.Enabled = False
- ElseIf Button9.Enabled = True Then
- Button9.Text = "X"
- Button9.Enabled = False
- ElseIf Button2.Enabled = True Then
- Button2.Text = "X"
- Button2.Enabled = False
- ElseIf Button4.Enabled = True Then
- Button4.Text = "X"
- Button4.Enabled = False
- ElseIf Button6.Enabled = True Then
- Button6.Text = "X"
- Button6.Enabled = False
- ElseIf Button8.Enabled = True Then
- Button8.Text = "X"
- Button8.Enabled = False
- End If
- End Sub '攻擊
- Sub AI5()
- If Button1.Text = "○" And Button3.Text = "○" And Button2.Text = "X" And Button5.Text = "X" Then
- Button4.Text = "X"
- Button4.Enabled = False
- att = 99
- ElseIf Button3.Text = "○" And Button9.Text = "○" And Button5.Text = "X" And Button6.Text = "X" Then
- Button2.Text = "X"
- Button2.Enabled = False
- att = 99
- ElseIf Button7.Text = "○" And Button9.Text = "○" And Button5.Text = "X" And Button8.Text = "X" Then
- Button6.Text = "X"
- Button6.Enabled = False
- att = 99
- ElseIf Button1.Text = "○" And Button7.Text = "○" And Button4.Text = "X" And Button5.Text = "X" Then
- Button8.Text = "X"
- Button8.Enabled = False
- att = 99
- End If
- End Sub 'Setp6特殊狀況 標記att=99[backcolor=rgb(253, 253, 253)]
複製代碼
... |
附件: 你需要登錄才可以下載或查看附件。沒有帳號?註冊 |