C newbie question
i have to program a n-in line game (hope you people know what i'm talking about)
anyway,
in order to print the game correctly each time a player plays, i will use a matrix that has a 0 if this space is empty, 1 if player one has a chip, an 2 if player two has a chip.
supposing i have defined my matrix like this in main
int matrix [] [5] = { {0,0,0,0,0} , {0,0,0,0,0} , {0,0,0,0,0} , {1,0,1,2,2} , {1,1,2,2,1} };
how would the protoype of my function print look like, ah how do i reference to each compnent of that matrix in order to know if i have to print an empty space, o one of the two kinds of chips?
|