Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim value1 As Integer
- Dim value2 As Integer
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Button1.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button1.BackColor = Color.DarkGreen
- Button1.Text = "X"
- Else
- Button1.BackColor = Color.IndianRed
- Button1.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Button2.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button2.BackColor = Color.DarkGreen
- Button2.Text = "X"
- Else
- Button2.BackColor = Color.IndianRed
- Button2.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Button3.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button3.BackColor = Color.DarkGreen
- Button3.Text = "X"
- Else
- Button3.BackColor = Color.IndianRed
- Button3.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- Button4.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button4.BackColor = Color.DarkGreen
- Button4.Text = "X"
- Else
- Button4.BackColor = Color.IndianRed
- Button4.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- Button5.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button5.BackColor = Color.DarkGreen
- Button5.Text = "X"
- Else
- Button5.BackColor = Color.IndianRed
- Button5.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
- Button6.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button6.BackColor = Color.DarkGreen
- Button6.Text = "X"
- Else
- Button6.BackColor = Color.IndianRed
- Button6.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
- Button7.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button7.BackColor = Color.DarkGreen
- Button7.Text = "X"
- Else
- Button7.BackColor = Color.IndianRed
- Button7.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
- Button8.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button8.BackColor = Color.DarkGreen
- Button8.Text = "X"
- Else
- Button8.BackColor = Color.IndianRed
- Button8.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
- Button9.Enabled = False
- value1 = value1 + 1
- If value1 = 1 Or value1 = 3 Or value1 = 5 Or value1 = 7 Or value1 = 9 Then
- Button9.BackColor = Color.DarkGreen
- Button9.Text = "X"
- Else
- Button9.BackColor = Color.IndianRed
- Button9.Text = "O"
- End If
- If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then
- TextBox1.Text = "Player 1 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "Ö" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then
- TextBox1.Text = "Player 2 wins"
- ElseIf value1 = 9 Then
- TextBox1.Text = "DRAW"
- End If
- End Sub
- Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click
- End
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement