Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void getMove(char **board, const int numRows, const int numCols, const
- char blankSpace, int *row, int *col) {
- int numArgsRead;
- const int numArgsNeeded = 1;
- do {
- printf("Enter a column between 0 and %d to play in: ", numCols - 1);
- numArgsRead = scanf("%d", col);
- for (int i = numRows - 1; i >= 0; --i) {
- if (board[i][*col] == blankSpace) {
- continue;
- }
- else {
- *row = i;
- }
- }
- } while(!isMoveValid(numArgsRead, numArgsNeeded, board, numRows, numCols, *row,
- *col, blankSpace));
- }
Add Comment
Please, Sign In to add comment