cyecize

First TTT game

Jun 4th, 2020
1,294
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class k
  2.  
  3.  
  4.  
  5.  
  6.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  7.         If Label2.Text = "Don't click twice!" Then
  8.             Label2.Visible = False
  9.  
  10.         End If
  11.  
  12.         If Button2.Text = "O" Or Button2.Text = "X" Then
  13.             Label2.Visible = True
  14.  
  15.             Label2.Text = "Don't click twice!"
  16.  
  17.  
  18.  
  19.         End If
  20.  
  21.         If Label2.Text = "X goes first" Then
  22.             Label2.Text = "Circle is second"
  23.         ElseIf Label2.Text = "Circle is second" Then
  24.             Label2.Visible = False
  25.  
  26.         End If
  27.  
  28.  
  29.         If Label2.Text = "Circle goes first" Then
  30.             Label2.Text = "X goes second"
  31.         ElseIf Label2.Text = "X goes second" Then
  32.             Label2.Visible = False
  33.  
  34.         End If
  35.         If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
  36.  
  37.             Label1.Text = "PLAYER1-WINNER"
  38.  
  39.         ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
  40.             Label1.Text = "PLAYER2-WINNER"
  41.         End If
  42.  
  43.  
  44.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  45.             Button1.Visible = True
  46.  
  47.         End If
  48.         If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
  49.  
  50.             Label1.Text = "PLAYER1-WINNER"
  51.  
  52.         ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
  53.             Label1.Text = "PLAYER2-WINNER"
  54.         End If
  55.  
  56.  
  57.  
  58.  
  59.         If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
  60.  
  61.             Label1.Text = "PLAYER1-WINNER"
  62.  
  63.         ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
  64.             Label1.Text = "PLAYER2-WINNER"
  65.  
  66.         End If
  67.  
  68.         If Label1.Text = "PLAYER1" Then
  69.             Button2.Text = "O"
  70.             Label1.Text = "PLAYER2"
  71.         ElseIf Label1.Text = "PLAYER2" Then
  72.             Button2.Text = "X"
  73.             Label1.Text = "PLAYER1"
  74.         End If
  75.         If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
  76.  
  77.             Label1.Text = "PLAYER1-WINNER"
  78.  
  79.         ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
  80.             Label1.Text = "PLAYER2-WINNER"
  81.         End If
  82.         If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
  83.  
  84.             Label1.Text = "PLAYER1-WINNER"
  85.  
  86.         ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
  87.             Label1.Text = "PLAYER2-WINNER"
  88.         End If
  89.  
  90.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  91.             Button1.Visible = True
  92.  
  93.         End If
  94.         If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
  95.  
  96.             Label1.Text = "PLAYER1-WINNER"
  97.  
  98.         ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
  99.             Label1.Text = "PLAYER2-WINNER"
  100.         End If
  101.         If Button2.Text = "O" Then
  102.             Button2.Text = "O"
  103.             Label1.Text = "PLAYER2"
  104.         ElseIf Button2.Text = "X" Then
  105.             Button2.Text = "X"
  106.             Label1.Text = "PLAYER1"
  107.         End If
  108.     End Sub
  109.  
  110.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  111.         If Label2.Text = "Don't click twice!" Then
  112.             Label2.Visible = False
  113.  
  114.         End If
  115.  
  116.         If Button3.Text = "O" Or Button3.Text = "X" Then
  117.             Label2.Visible = True
  118.  
  119.             Label2.Text = "Don't click twice!"
  120.  
  121.  
  122.  
  123.         End If
  124.         If Label2.Text = "X goes first" Then
  125.             Label2.Text = "Circle is second"
  126.         ElseIf Label2.Text = "Circle is second" Then
  127.             Label2.Visible = False
  128.  
  129.         End If
  130.         If Label2.Text = "Circle goes first" Then
  131.             Label2.Text = "X goes second"
  132.         ElseIf Label2.Text = "X goes second" Then
  133.             Label2.Visible = False
  134.  
  135.         End If
  136.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  137.             Button1.Visible = True
  138.  
  139.         End If
  140.         If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
  141.  
  142.             Label1.Text = "PLAYER1-WINNER"
  143.  
  144.         ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
  145.             Label1.Text = "PLAYER2-WINNER"
  146.         End If
  147.         If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
  148.  
  149.             Label1.Text = "PLAYER1-WINNER"
  150.  
  151.         ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
  152.             Label1.Text = "PLAYER2-WINNER"
  153.  
  154.         End If
  155.         If Label1.Text = "PLAYER1" Then
  156.             Button3.Text = "O"
  157.             Label1.Text = "PLAYER2"
  158.         ElseIf Label1.Text = "PLAYER2" Then
  159.             Button3.Text = "X"
  160.             Label1.Text = "PLAYER1"
  161.         End If
  162.         If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
  163.  
  164.             Label1.Text = "PLAYER1-WINNER"
  165.  
  166.         ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
  167.             Label1.Text = "PLAYER2-WINNER"
  168.  
  169.         End If
  170.         If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
  171.  
  172.             Label1.Text = "PLAYER1-WINNER"
  173.  
  174.         ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
  175.             Label1.Text = "PLAYER2-WINNER"
  176.         End If
  177.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  178.             Button1.Visible = True
  179.  
  180.         End If
  181.     End Sub
  182.  
  183.     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  184.  
  185.  
  186.         If Label2.Text = "Don't click twice!" Then
  187.             Label2.Visible = False
  188.  
  189.         End If
  190.         If Button4.Text = "O" Or Button4.Text = "X" Then
  191.             Label2.Visible = True
  192.  
  193.             Label2.Text = "Don't click twice!"
  194.  
  195.  
  196.  
  197.         End If
  198.  
  199.         If Label2.Text = "X goes first" Then
  200.             Label2.Text = "Circle is second"
  201.         ElseIf Label2.Text = "Circle is second" Then
  202.             Label2.Visible = False
  203.  
  204.         End If
  205.         If Label2.Text = "Circle goes first" Then
  206.             Label2.Text = "X goes second"
  207.         ElseIf Label2.Text = "X goes second" Then
  208.             Label2.Visible = False
  209.  
  210.         End If
  211.  
  212.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  213.             Button1.Visible = True
  214.  
  215.         End If
  216.  
  217.         If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
  218.  
  219.             Label1.Text = "PLAYER1-WINNER"
  220.  
  221.         ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
  222.             Label1.Text = "PLAYER2-WINNER"
  223.         End If
  224.         If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
  225.  
  226.             Label1.Text = "PLAYER1-WINNER"
  227.  
  228.         ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
  229.             Label1.Text = "PLAYER2-WINNER"
  230.         End If
  231.  
  232.         If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
  233.  
  234.             Label1.Text = "PLAYER1-WINNER"
  235.  
  236.         ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
  237.             Label1.Text = "PLAYER2-WINNER"
  238.  
  239.         End If
  240.  
  241.         If Label1.Text = "PLAYER1" Then
  242.             Button4.Text = "O"
  243.             Label1.Text = "PLAYER2"
  244.         ElseIf Label1.Text = "PLAYER2" Then
  245.             Button4.Text = "X"
  246.             Label1.Text = "PLAYER1"
  247.         End If
  248.         If Button2.Text = "O" And Button3.Text = "O" And Button4.Text = "O" Then
  249.  
  250.             Label1.Text = "PLAYER1-WINNER"
  251.  
  252.         ElseIf Button2.Text = "X" And Button3.Text = "X" And Button4.Text = "X" Then
  253.             Label1.Text = "PLAYER2-WINNER"
  254.  
  255.         End If
  256.         If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
  257.  
  258.             Label1.Text = "PLAYER1-WINNER"
  259.  
  260.         ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
  261.             Label1.Text = "PLAYER2-WINNER"
  262.         End If
  263.  
  264.         If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
  265.  
  266.             Label1.Text = "PLAYER1-WINNER"
  267.  
  268.         ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
  269.             Label1.Text = "PLAYER2-WINNER"
  270.         End If
  271.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  272.             Button1.Visible = True
  273.  
  274.         End If
  275.     End Sub
  276.  
  277.  
  278.  
  279.     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  280.  
  281.  
  282.         If Label2.Text = "Don't click twice!" Then
  283.             Label2.Visible = False
  284.  
  285.         End If
  286.         If Button5.Text = "O" Or Button5.Text = "X" Then
  287.             Label2.Visible = True
  288.  
  289.             Label2.Text = "Don't click twice!"
  290.  
  291.  
  292.  
  293.         End If
  294.         If Label2.Text = "X goes first" Then
  295.             Label2.Text = "Circle is second"
  296.         ElseIf Label2.Text = "Circle is second" Then
  297.             Label2.Visible = False
  298.  
  299.         End If
  300.         If Label2.Text = "Circle goes first" Then
  301.             Label2.Text = "X goes second"
  302.         ElseIf Label2.Text = "X goes second" Then
  303.             Label2.Visible = False
  304.  
  305.         End If
  306.  
  307.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  308.             Button1.Visible = True
  309.  
  310.         End If
  311.         If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
  312.  
  313.             Label1.Text = "PLAYER1-WINNER"
  314.  
  315.         ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
  316.             Label1.Text = "PLAYER2-WINNER"
  317.         End If
  318.  
  319.  
  320.  
  321.         If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
  322.  
  323.             Label1.Text = "PLAYER1-WINNER"
  324.  
  325.         ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
  326.             Label1.Text = "PLAYER2-WINNER"
  327.         End If
  328.  
  329.         If Label1.Text = "PLAYER1" Then
  330.             Button5.Text = "O"
  331.             Label1.Text = "PLAYER2"
  332.         ElseIf Label1.Text = "PLAYER2" Then
  333.             Button5.Text = "X"
  334.             Label1.Text = "PLAYER1"
  335.         End If
  336.  
  337.         If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
  338.  
  339.             Label1.Text = "PLAYER1-WINNER"
  340.  
  341.         ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
  342.             Label1.Text = "PLAYER2-WINNER"
  343.         End If
  344.  
  345.         If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
  346.  
  347.             Label1.Text = "PLAYER1-WINNER"
  348.  
  349.         ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
  350.             Label1.Text = "PLAYER2-WINNER"
  351.         End If
  352.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  353.             Button1.Visible = True
  354.  
  355.         End If
  356.     End Sub
  357.  
  358.     Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  359.  
  360.  
  361.         If Label2.Text = "Don't click twice!" Then
  362.             Label2.Visible = False
  363.  
  364.         End If
  365.         If Button6.Text = "O" Or Button6.Text = "X" Then
  366.             Label2.Visible = True
  367.  
  368.             Label2.Text = "Don't click twice!"
  369.  
  370.  
  371.  
  372.         End If
  373.  
  374.         If Label2.Text = "X goes first" Then
  375.             Label2.Text = "Circle is second"
  376.         ElseIf Label2.Text = "Circle is second" Then
  377.             Label2.Visible = False
  378.  
  379.         End If
  380.         If Label2.Text = "Circle goes first" Then
  381.             Label2.Text = "X goes second"
  382.         ElseIf Label2.Text = "X goes second" Then
  383.             Label2.Visible = False
  384.  
  385.         End If
  386.  
  387.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  388.             Button1.Visible = True
  389.  
  390.         End If
  391.         If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
  392.  
  393.             Label1.Text = "PLAYER1-WINNER"
  394.  
  395.         ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
  396.             Label1.Text = "PLAYER2-WINNER"
  397.         End If
  398.  
  399.         If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
  400.  
  401.             Label1.Text = "PLAYER1-WINNER"
  402.  
  403.         ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
  404.             Label1.Text = "PLAYER2-WINNER"
  405.         End If
  406.  
  407.  
  408.         If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
  409.  
  410.             Label1.Text = "PLAYER1-WINNER"
  411.  
  412.         ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
  413.             Label1.Text = "PLAYER2-WINNER"
  414.         End If
  415.         If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
  416.  
  417.             Label1.Text = "PLAYER1-WINNER"
  418.  
  419.         ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
  420.             Label1.Text = "PLAYER2-WINNER"
  421.         End If
  422.         If Label1.Text = "PLAYER1" Then
  423.             Button6.Text = "O"
  424.             Label1.Text = "PLAYER2"
  425.         ElseIf Label1.Text = "PLAYER2" Then
  426.             Button6.Text = "X"
  427.             Label1.Text = "PLAYER1"
  428.         End If
  429.         If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
  430.  
  431.             Label1.Text = "PLAYER1-WINNER"
  432.  
  433.         ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
  434.             Label1.Text = "PLAYER2-WINNER"
  435.         End If
  436.         If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
  437.  
  438.             Label1.Text = "PLAYER1-WINNER"
  439.  
  440.         ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
  441.             Label1.Text = "PLAYER2-WINNER"
  442.         End If
  443.         If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
  444.  
  445.             Label1.Text = "PLAYER1-WINNER"
  446.  
  447.         ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
  448.             Label1.Text = "PLAYER2-WINNER"
  449.         End If
  450.         If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
  451.  
  452.             Label1.Text = "PLAYER1-WINNER"
  453.  
  454.         ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
  455.             Label1.Text = "PLAYER2-WINNER"
  456.         End If
  457.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  458.             Button1.Visible = True
  459.  
  460.         End If
  461.     End Sub
  462.  
  463.     Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
  464.  
  465.         If Label2.Text = "Don't click twice!" Then
  466.             Label2.Visible = False
  467.  
  468.         End If
  469.         If Button7.Text = "O" Or Button7.Text = "X" Then
  470.             Label2.Visible = True
  471.  
  472.             Label2.Text = "Don't click twice!"
  473.  
  474.  
  475.  
  476.         End If
  477.  
  478.         If Label2.Text = "X goes first" Then
  479.             Label2.Text = "Circle is second"
  480.         ElseIf Label2.Text = "Circle is second" Then
  481.             Label2.Visible = False
  482.  
  483.         End If
  484.         If Label2.Text = "Circle goes first" Then
  485.             Label2.Text = "X goes second"
  486.         ElseIf Label2.Text = "X goes second" Then
  487.             Label2.Visible = False
  488.  
  489.         End If
  490.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  491.             Button1.Visible = True
  492.  
  493.         End If
  494.         If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
  495.  
  496.             Label1.Text = "PLAYER1-WINNER"
  497.  
  498.         ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
  499.             Label1.Text = "PLAYER2-WINNER"
  500.         End If
  501.  
  502.         If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
  503.  
  504.             Label1.Text = "PLAYER1-WINNER"
  505.  
  506.         ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
  507.             Label1.Text = "PLAYER2-WINNER"
  508.  
  509.         End If
  510.  
  511.         If Label1.Text = "PLAYER1" Then
  512.             Button7.Text = "O"
  513.             Label1.Text = "PLAYER2"
  514.         ElseIf Label1.Text = "PLAYER2" Then
  515.             Button7.Text = "X"
  516.             Label1.Text = "PLAYER1"
  517.         End If
  518.         If Button5.Text = "O" And Button7.Text = "O" And Button6.Text = "O" Then
  519.  
  520.             Label1.Text = "PLAYER1-WINNER"
  521.  
  522.         ElseIf Button5.Text = "X" And Button6.Text = "X" And Button7.Text = "X" Then
  523.             Label1.Text = "PLAYER2-WINNER"
  524.         End If
  525.         If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
  526.  
  527.             Label1.Text = "PLAYER1-WINNER"
  528.  
  529.         ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
  530.             Label1.Text = "PLAYER2-WINNER"
  531.         End If
  532.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  533.             Button1.Visible = True
  534.  
  535.         End If
  536.     End Sub
  537.  
  538.     Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
  539.  
  540.  
  541.         If Label2.Text = "Don't click twice!" Then
  542.             Label2.Visible = False
  543.  
  544.         End If
  545.         If Button8.Text = "O" Or Button8.Text = "X" Then
  546.             Label2.Visible = True
  547.  
  548.             Label2.Text = "Don't click twice!"
  549.  
  550.  
  551.  
  552.         End If
  553.  
  554.         If Label2.Text = "X goes first" Then
  555.             Label2.Text = "Circle is second"
  556.         ElseIf Label2.Text = "Circle is second" Then
  557.             Label2.Visible = False
  558.  
  559.         End If
  560.         If Label2.Text = "Circle goes first" Then
  561.             Label2.Text = "X goes second"
  562.         ElseIf Label2.Text = "X goes second" Then
  563.             Label2.Visible = False
  564.  
  565.         End If
  566.  
  567.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  568.             Button1.Visible = True
  569.  
  570.         End If
  571.         If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
  572.  
  573.             Label1.Text = "PLAYER1-WINNER"
  574.  
  575.         ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
  576.             Label1.Text = "PLAYER2-WINNER"
  577.         End If
  578.  
  579.         If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
  580.  
  581.             Label1.Text = "PLAYER1-WINNER"
  582.  
  583.         ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
  584.             Label1.Text = "PLAYER2-WINNER"
  585.         End If
  586.         If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
  587.  
  588.             Label1.Text = "PLAYER1-WINNER"
  589.  
  590.         ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
  591.             Label1.Text = "PLAYER2-WINNER"
  592.         End If
  593.  
  594.         If Label1.Text = "PLAYER1" Then
  595.             Button8.Text = "O"
  596.             Label1.Text = "PLAYER2"
  597.         ElseIf Label1.Text = "PLAYER2" Then
  598.             Button8.Text = "X"
  599.             Label1.Text = "PLAYER1"
  600.         End If
  601.         If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
  602.  
  603.             Label1.Text = "PLAYER1-WINNER"
  604.  
  605.         ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
  606.             Label1.Text = "PLAYER2-WINNER"
  607.         End If
  608.  
  609.         If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
  610.  
  611.             Label1.Text = "PLAYER1-WINNER"
  612.  
  613.         ElseIf Button8.Text = "X" And Button2.Text = "X" And Button5.Text = "X" Then
  614.             Label1.Text = "PLAYER2-WINNER"
  615.         End If
  616.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  617.             Button1.Visible = True
  618.  
  619.         End If
  620.  
  621.  
  622.  
  623.         If Button8.Text = "O" And Button6.Text = "O" And Button4.Text = "O" Then
  624.  
  625.             Label1.Text = "PLAYER1-WINNER"
  626.  
  627.         ElseIf Button8.Text = "X" And Button6.Text = "X" And Button4.Text = "X" Then
  628.             Label1.Text = "PLAYER2-WINNER"
  629.         End If
  630.  
  631.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  632.             Button1.Visible = True
  633.         End If
  634.  
  635.  
  636.     End Sub
  637.  
  638.     Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
  639.  
  640.  
  641.         If Label2.Text = "Don't click twice!" Then
  642.             Label2.Visible = False
  643.  
  644.         End If
  645.         If Button9.Text = "O" Or Button9.Text = "X" Then
  646.             Label2.Visible = True
  647.  
  648.             Label2.Text = "Don't click twice!"
  649.  
  650.  
  651.  
  652.         End If
  653.  
  654.         If Label2.Text = "X goes first" Then
  655.             Label2.Text = "Circle is second"
  656.         ElseIf Label2.Text = "Circle is second" Then
  657.             Label2.Visible = False
  658.  
  659.         End If
  660.         If Label2.Text = "Circle goes first" Then
  661.             Label2.Text = "X goes second"
  662.         ElseIf Label2.Text = "X goes second" Then
  663.             Label2.Visible = False
  664.  
  665.         End If
  666.  
  667.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  668.             Button1.Visible = True
  669.  
  670.         End If
  671.         If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
  672.  
  673.             Label1.Text = "PLAYER1-WINNER"
  674.  
  675.         ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
  676.             Label1.Text = "PLAYER2-WINNER"
  677.         End If
  678.  
  679.         If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
  680.  
  681.             Label1.Text = "PLAYER1-WINNER"
  682.  
  683.         ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
  684.             Label1.Text = "PLAYER2-WINNER"
  685.         End If
  686.  
  687.         If Label1.Text = "PLAYER1" Then
  688.             Button9.Text = "O"
  689.             Label1.Text = "PLAYER2"
  690.         ElseIf Label1.Text = "PLAYER2" Then
  691.             Button9.Text = "X"
  692.             Label1.Text = "PLAYER1"
  693.         End If
  694.         If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
  695.  
  696.             Label1.Text = "PLAYER1-WINNER"
  697.  
  698.         ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
  699.             Label1.Text = "PLAYER2-WINNER"
  700.         End If
  701.         If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
  702.  
  703.             Label1.Text = "PLAYER1-WINNER"
  704.  
  705.         ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
  706.             Label1.Text = "PLAYER2-WINNER"
  707.         End If
  708.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  709.             Button1.Visible = True
  710.  
  711.         End If
  712.     End Sub
  713.  
  714.     Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
  715.  
  716.  
  717.  
  718.         If Label2.Text = "Don't click twice!" Then
  719.             Label2.Visible = False
  720.  
  721.         End If
  722.         If Button10.Text = "O" Or Button10.Text = "X" Then
  723.             Label2.Visible = True
  724.  
  725.             Label2.Text = "Don't click twice!"
  726.  
  727.  
  728.  
  729.         End If
  730.  
  731.         If Label2.Text = "X goes first" Then
  732.             Label2.Text = "Circle is second"
  733.         ElseIf Label2.Text = "Circle is second" Then
  734.             Label2.Visible = False
  735.  
  736.         End If
  737.         If Label2.Text = "Circle goes first" Then
  738.             Label2.Text = "X goes second"
  739.         ElseIf Label2.Text = "X goes second" Then
  740.             Label2.Visible = False
  741.  
  742.         End If
  743.  
  744.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  745.             Button1.Visible = True
  746.  
  747.         End If
  748.         If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
  749.  
  750.             Label1.Text = "PLAYER1-WINNER"
  751.  
  752.         ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
  753.             Label1.Text = "PLAYER2-WINNER"
  754.         End If
  755.  
  756.         If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
  757.  
  758.             Label1.Text = "PLAYER1-WINNER"
  759.  
  760.         ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
  761.             Label1.Text = "PLAYER2-WINNER"
  762.         End If
  763.         If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
  764.  
  765.             Label1.Text = "PLAYER1-WINNER"
  766.  
  767.         ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
  768.             Label1.Text = "PLAYER2-WINNER"
  769.         End If
  770.  
  771.         If Label1.Text = "PLAYER1" Then
  772.             Button10.Text = "O"
  773.             Label1.Text = "PLAYER2"
  774.         ElseIf Label1.Text = "PLAYER2" Then
  775.             Button10.Text = "X"
  776.             Label1.Text = "PLAYER1"
  777.         End If
  778.  
  779.         If Button8.Text = "O" And Button9.Text = "O" And Button10.Text = "O" Then
  780.  
  781.             Label1.Text = "PLAYER1-WINNER"
  782.  
  783.         ElseIf Button8.Text = "X" And Button9.Text = "X" And Button10.Text = "X" Then
  784.             Label1.Text = "PLAYER2-WINNER"
  785.         End If
  786.  
  787.         If Button4.Text = "O" And Button7.Text = "O" And Button10.Text = "O" Then
  788.  
  789.             Label1.Text = "PLAYER1-WINNER"
  790.  
  791.         ElseIf Button4.Text = "X" And Button7.Text = "X" And Button10.Text = "X" Then
  792.             Label1.Text = "PLAYER2-WINNER"
  793.         End If
  794.         If Button2.Text = "O" And Button6.Text = "O" And Button10.Text = "O" Then
  795.  
  796.             Label1.Text = "PLAYER1-WINNER"
  797.  
  798.         ElseIf Button2.Text = "X" And Button6.Text = "X" And Button10.Text = "X" Then
  799.             Label1.Text = "PLAYER2-WINNER"
  800.         End If
  801.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  802.             Button1.Visible = True
  803.  
  804.         End If
  805.     End Sub
  806.  
  807.     Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
  808.         If Label1.Text = "PLAYER1-WINNER" Or Label1.Text = "PLAYER2-WINNER" Then
  809.             Button1.Visible = True
  810.  
  811.         End If
  812.     End Sub
  813.  
  814.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  815.         If Label1.Text = "PLAYER1-WINNER" Then
  816.             TextBox1.Text = TextBox1.Text + 1
  817.             Label1.Text = "PLAYER2"
  818.             Label2.Text = "X goes first"
  819.             Label2.Visible = True
  820.  
  821.  
  822.         End If
  823.         If Label1.Text = "PLAYER2-WINNER" Then
  824.             TextBox2.Text = TextBox2.Text + 1
  825.             Label1.Text = "PLAYER1"
  826.             Label2.Text = "Circle goes first"
  827.             Label2.Visible = True
  828.  
  829.  
  830.         End If
  831.  
  832.         Button1.Visible = False
  833.         Button2.Text = ""
  834.         Button3.Text = ""
  835.         Button4.Text = ""
  836.         Button5.Text = ""
  837.         Button6.Text = ""
  838.         Button7.Text = ""
  839.         Button8.Text = ""
  840.         Button9.Text = ""
  841.         Button10.Text = ""
  842.  
  843.     End Sub
  844. End Class
RAW Paste Data