Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If ai = 1 Then
- Dim AntiAiTeam
- If Whosup = "X" Then
- AntiAiTeam = "O"
- Else
- AntiAiTeam = "X"
- End If
- ' Checking If it can win
- ' PATTERN 1
- If gameboard_1_1.Text = spaces And gameboard_2_1.Text = AiTeam And gameboard_3_1.Text = AiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- 'PATTERN 2
- If gameboard_1_1.Text = spaces And gameboard_1_2.Text = AiTeam And gameboard_1_3.Text = AiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- 'PATTERN 3
- If gameboard_1_1.Text = spaces And gameboard_2_2.Text = AiTeam And gameboard_3_3.Text = AiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- 'PATTERN 4
- If gameboard_2_1.Text = spaces And gameboard_1_1.Text = AiTeam And gameboard_3_1.Text = AiTeam Then
- gameboard_2_1.Text = Whosup
- GoTo end_of_ai
- End If
- 'PATTERN 5
- If gameboard_2_1.Text = spaces And gameboard_2_2.Text = AiTeam And gameboard_2_3.Text = AiTeam Then
- gameboard_2_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 6
- If gameboard_1_1.Text = spaces And gameboard_2_1.Text = AntiAiTeam And gameboard_3_1.Text = AntiAiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 7
- If gameboard_1_1.Text = spaces And gameboard_1_2.Text = AntiAiTeam And gameboard_1_3.Text = AntiAiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 8
- If gameboard_1_1.Text = spaces And gameboard_2_2.Text = AntiAiTeam And gameboard_3_3.Text = AntiAiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 9
- If gameboard_2_1.Text = spaces And gameboard_1_1.Text = AntiAiTeam And gameboard_3_1.Text = AntiAiTeam Then
- gameboard_2_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 10
- If gameboard_2_1.Text = spaces And gameboard_2_2.Text = AntiAiTeam And gameboard_2_3.Text = AntiAiTeam Then
- gameboard_2_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Causes glitches
- '' Pattern 11
- 'If gameboard_2_1.Text = spaces And gameboard_2_2.Text = AiTeam And gameboard_1_3.Text = AntiAiTeam And gameboard_3_1.Text = AntiAiTeam Then
- ' gameboard_2_1.Text = Whosup
- ' GoTo end_of_ai
- 'End If
- ' Pattern 12
- If gameboard_1_1.Text = spaces And gameboard_1_2.Text = AntiAiTeam And gameboard_2_1.Text = AntiAiTeam And gameboard_2_2.Text = AiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 13
- If gameboard_1_1.Text = spaces And gameboard_1_2.Text = AntiAiTeam And gameboard_2_2.Text = AiTeam And gameboard_3_1.Text = AntiAiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 14
- If gameboard_1_1.Text = spaces And gameboard_1_3.Text = AntiAiTeam And gameboard_2_2.Text = AiTeam And gameboard_3_1.Text = AntiAiTeam Then
- gameboard_1_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 15
- If gameboard_2_1.Text = spaces And gameboard_2_1.Text = AntiAiTeam Then
- gameboard_2_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Causes gliches
- '' Pattern 16
- 'If gameboard_1_1.Text = spaces And gameboard_2_2.Text = AntiAiTeam Then
- ' gameboard_1_1.Text = Whosup
- ' GoTo end_of_ai
- 'End If
- ' Pattern 17
- If gameboard_3_3.Text = spaces And gameboard_2_3.Text = AntiAiTeam And gameboard_1_3.Text = AntiAiTeam Then
- gameboard_3_3.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 18
- If gameboard_3_1.Text = spaces And gameboard_3_2.Text = AntiAiTeam And gameboard_3_3.Text = AntiAiTeam Then
- gameboard_3_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 19
- If gameboard_1_3.Text = spaces And gameboard_1_1.Text = AntiAiTeam And gameboard_1_2.Text = AntiAiTeam Then
- gameboard_1_3.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 20
- If gameboard_2_2.Text = spaces And gameboard_1_2.Text = AntiAiTeam And gameboard_3_2.Text = AntiAiTeam Then
- gameboard_2_2.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 21
- If gameboard_2_2.Text = spaces And gameboard_1_3.Text = AntiAiTeam And gameboard_3_1.Text = AntiAiTeam Then
- gameboard_2_2.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 22
- If gameboard_3_1.Text = spaces And gameboard_2_2.Text = AntiAiTeam And gameboard_1_3.Text = AntiAiTeam Then
- gameboard_3_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 23
- If gameboard_3_2.Text = spaces And gameboard_1_2.Text = AntiAiTeam And gameboard_2_2.Text = AntiAiTeam Then
- gameboard_3_2.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 24
- If gameboard_2_3.Text = spaces And gameboard_2_1.Text = AntiAiTeam And gameboard_2_2.Text = spaces Then
- gameboard_2_3.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 25
- If gameboard_3_1.Text = spaces And gameboard_2_1.Text = AntiAiTeam And gameboard_1_1.Text = AntiAiTeam Then
- gameboard_3_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 26
- If gameboard_3_1.Text = spaces And gameboard_2_1.Text = AntiAiTeam And gameboard_1_1.Text = AntiAiTeam Then
- gameboard_3_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 27
- If gameboard_3_1.Text = spaces And gameboard_2_2.Text = AntiAiTeam And gameboard_1_3.Text = AntiAiTeam Then
- gameboard_3_1.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 28
- If gameboard_2_3.Text = spaces And gameboard_1_3.Text = AntiAiTeam And gameboard_3_3.Text = AntiAiTeam Then
- gameboard_2_3.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 29
- If gameboard_1_3.Text = spaces And gameboard_2_2.Text = AntiAiTeam And gameboard_3_1.Text = AntiAiTeam Then
- gameboard_1_3.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 30
- If gameboard_2_3.Text = spaces And gameboard_2_2.Text = AntiAiTeam And gameboard_2_1.Text = AntiAiTeam Then
- gameboard_2_3.Text = Whosup
- GoTo end_of_ai
- End If
- ' Pattern 31
- If gameboard_2_3.Text = spaces And gameboard_3_3.Text = spaces And gameboard_1_3.Text = AntiAiTeam Then
- gameboard_2_3.Text = Whosup
- GoTo end_of_ai
- End If
- If gameboard_1_3.Text = spaces Then
- gameboard_1_3.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_1_2.Text = spaces Then
- gameboard_1_2.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_1_3.Text = spaces Then
- gameboard_1_3.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_2_1.Text = spaces Then
- gameboard_2_1.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_2_2.Text = spaces Then
- gameboard_2_2.Text = Whosup
- ElseIf gameboard_2_3.Text = spaces Then
- gameboard_2_3.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_3_1.Text = spaces Then
- gameboard_3_1.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_3_2.Text = spaces Then
- gameboard_3_2.Text = Whosup
- GoTo end_of_ai
- ElseIf gameboard_3_3.Text = spaces Then
- gameboard_3_3.Text = Whosup
- GoTo end_of_ai
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement