If Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O" Then If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "O" Then If Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then If Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then If Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then If Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then If Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then If Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then If Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then If Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" ThenĮlseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" ThenĮlseIf Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then Private Sub Buttons_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, Button3.Click, Button4.Click, Button5.Click, Button6.Click, Button7.Click, Button8.Click, Button9.Click Private Sub PlayButton_Click(sender As Object, e As EventArgs) Handles PlayButton.Click Private Sub ExitButton_Click(sender As Object, e As EventArgs) Handles ExitButton.Click Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load The game accurately checks if there is a winner but is missing to know when there is no winner. If not, is there a way to make this code less long with loops? This is a User vs User Tic Tac Toe game how can I implement a loop to check whether there is a TIE in the game instead of using if/else statements?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |