PDA

View Full Version : Help on checking for a Win in Tic Tac Toe


chrisvmarle
11-28-2002, 05:37 PM
I'm still working on the Tic Tac Toe thing I was posting about a few days ago and I need help on a little something;

What would be the best way to check for a Win?
The moves are stored in $moves[X] to $moves[8] where X matches the following pattern:

0 | 1 | 2
----------
3 | 4 | 5
----------
6 | 7 | 8

and the values of the are either "X", "O" or " " (space);

Anyone any ideas?

Thanks in advance
Mzzl, Chris