At the moment my code looks like this: This code is taken from a noughts and crosses game
printf("%s enter you next move, '0's\n",name1); /*asks for m move by name*/
What I want it to do is recognize if a position on the board is already taken, I know this is the answer (below) but dont know how to re-work the loop and add the below code, ive tried a few things but it doesnt work.
if( r0 != -1 && c0 != -1 )
printf("The place is already occupied\n");
If you require more code it will be provided, just ask.