help with arrays and loops
im sorry about this repost. i just registered my screen name so i can be certain that i could go bak and modify my question.
i need help with the for loops to check the winning combinations.
thank you
using an array, how can i check if there is a certain number of 'chips' in a row, horizontal or diagonal. i know that there are a bunch a for loops. its cause this is bearly my first programming class and we just went over this like 4 days ago and he just went over regular arrays like a[5] and like 1/2 a class on a[5][5] so im totally lost. it will be totally appreciated. PLEASE help me. i cant get it to work.
for example:
a[5][5];
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
(o) (o) (o) (o) ( )
this is a winner
( ) ( ) ( ) ( ) ( )
(o) ( ) ( ) ( ) ( )
(o) ( ) ( ) ( ) ( )
(o) ( ) ( ) ( ) ( )
(o) ( ) ( ) ( ) ( )
this is a winner
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) (o) ( )
( ) ( ) (o) ( ) ( )
( ) (o) ( ) ( ) ( )
(o) ( ) ( ) ( ) ( )
this is a winner
( ) ( ) ( ) ( ) ( )
( ) (o) ( ) ( ) ( )
( ) ( ) (o) ( ) ( )
( ) ( ) ( ) (o) ( )
( ) ( ) ( ) ( ) (o)
this is a winner
ok thanx. i understand the vertical and horizontal loops..but what about the diagonal loops.. thanx