I am making a game of tic tac toe, and I have 9 buttons lined up in a grid pattern. I want to select a random button for the computer to start the game from.
I have an array set up with all the names of my buttons, and I was thinking of picking a random entry from that array to start working from. This I have done fine, but I cannot change the text of a button. My code:
''# Define the array
random(0) = "tl"
random(1) = "tc"
random(2) = "tr"
random(3) = "cl"
random(4) = "cc"
random(5) = "cr"
random(6) = "bl"
random(7) = "bc"
random(8) = "br"
''# Grab a random array entry
StartPoint = random(RandomClass.Next(0, 8))
as you can see, I can't simply do StartPoint.Text = "O"
, even thought StartPoint holds the name for the button.
Any help on changing the buttons text from the name in StartPoint would be helpful, thanks.