0

I am in school and just learning and I am completely stumped on this lesson.

I have determined that I will be using an array

dim playingBoard(2,2) as string - 9 possible places to put an x or an o
dim x as integer
dim o as integer

I have a total of 9 textbox's

textBox1 - textBox9

have a Sub for each textBox

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

I did this so that when an x or an o was typed into the textbox it would get the focus and I could do something with it.

I want to do a private function that checks to see if I have 3 x's or 3 o's in a row based on the placement of the x and o's. So I created a lookForWinner Sub to do the function for me.

ie. if textBox1 and textBox2 and textBox3 have o's in them then messagebox.show("o's win")

Can anyone help me with this? I am just missing something and I just don't understand why I can't get the code to do what I want.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Luc001
0

Hi,

You can find more tutorials about Tic Tac Toe games on Google.
But this is another one, here.

Edited by Luc001: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.