Tic Tac Toe with classes

Posted 06 January 2011 - 10:59 AM

My program consists of a gameboard(a .bmp)that , when clicked , a value is set in a matrix (1 for x, 2 for o). The board is 5by5 to 9by9 and winning is when a player has clicked 5 squares, not 3;
The project is in c++Builder 6;

The function that is supposed to return 1 if x wins and 2 if o wins is :
//---------------------------------------------------------------

//---------------------------------------------------------------
The problem is that only the first row seems to work ; any other possible winning group(on a column, or diagonally ) is not "seen" by the function.
I would be very grateful if anyone can spot the mistakes i've made.Thank you !