View Single Post
Old Nov 19th, 2005, 10:32 AM   #2
Kilo
Expert Programmer
 
Kilo's Avatar
 
Join Date: Nov 2005
Location: In Pink Clam?
Posts: 542
Rep Power: 0 Kilo is an unknown quantity at this point
Send a message via AIM to Kilo
Quote:
Originally Posted by JDS
I'm programming a VB tic tac toe game. for the board I have 9 image controls
named tictactoe(Index). and two picture controls (one X one O) called Sign(0), and Sign(1) (0 is X). I drag and drop the Sign controls onto the tictactoe one and everything works fine. What I need help on is determining the winner of the game. Right now all I know is how to:

For Index = 0 to 2
if tictactoe(Index).picture = Sign(0).picture Then
Winner = "X"
cmdnew_click
end if
Next

Naturally though using this code whenever I put down an X on the top row, it immediatly says X is the winner and ends the game. How do I make it so the ENTIRE top row has to be X before this code executes?

Thx

Post the code you have so far... but it sounds like it you main game loop you need to add a "CheckRows" function call after player turn...
__________________
"When in Rome, Do as the Romans Do"
"Beauty is in the eye of the BEER holder"
"Save your breath your going to need it for your blow up doll later"

SearchLores.org
Kilo is offline   Reply With Quote