Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class k
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button2.Text = "O" Or Button2.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button2.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button2.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" Then
- Button2.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Button2.Text = "X" Then
- Button2.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button3.Text = "O" Or Button3.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button3.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button3.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button4.Text = "O" Or Button4.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button4.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button4.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button5.Text = "O" Or Button5.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button5.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button5.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button6.Text = "O" Or Button6.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button6.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button6.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button7.Text = "O" Or Button7.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button7.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button7.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button8.Text = "O" Or Button8.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button8.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button8.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button9.Text = "O" Or Button9.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button9.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button9.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
- If Label2.Text = "Don't click twice!" Then
- Label2.Visible = False
- End If
- If Button10.Text = "O" Or Button10.Text = "X" Then
- Label2.Visible = True
- Label2.Text = "Don't click twice!"
- End If
- If Label2.Text = "X goes first" Then
- Label2.Text = "Circle is second"
- ElseIf Label2.Text = "Circle is second" Then
- Label2.Visible = False
- End If
- If Label2.Text = "Circle goes first" Then
- Label2.Text = "X goes second"
- ElseIf Label2.Text = "X goes second" Then
- Label2.Visible = False
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1" Then
- Button10.Text = "O"
- Label1.Text = "PLAYER2"
- ElseIf Label1.Text = "PLAYER2" Then
- Button10.Text = "X"
- Label1.Text = "PLAYER1"
- End If
- If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
- Label1.Text = "PLAYER1-WINNER"
- ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
- Label1.Text = "PLAYER2-WINNER"
- End If
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
- If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
- Button1.Visible = True
- End If
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If Label1.Text = "PLAYER1-WINNER" Then
- TextBox1.Text = TextBox1.Text + 1
- Label1.Text = "PLAYER2"
- Label2.Text = "X goes first"
- Label2.Visible = True
- End If
- If Label1.Text = "PLAYER2-WINNER" Then
- TextBox2.Text = TextBox2.Text + 1
- Label1.Text = "PLAYER1"
- Label2.Text = "Circle goes first"
- Label2.Visible = True
- End If
- Button1.Visible = False
- Button2.Text = ""
- Button3.Text = ""
- Button4.Text = ""
- Button5.Text = ""
- Button6.Text = ""
- Button7.Text = ""
- Button8.Text = ""
- Button9.Text = ""
- Button10.Text = ""
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement