Guest User

Untitled

a guest
Nov 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. void getMove(char **board, const int numRows, const int numCols, const
  2. char blankSpace, int *row, int *col) {
  3. int numArgsRead;
  4. const int numArgsNeeded = 1;
  5.  
  6. do {
  7. printf("Enter a column between 0 and %d to play in: ", numCols - 1);
  8. numArgsRead = scanf("%d", col);
  9.  
  10. for (int i = numRows - 1; i >= 0; --i) {
  11. if (board[i][*col] == blankSpace) {
  12. continue;
  13. }
  14. else {
  15. *row = i;
  16. }
  17. }
  18. } while(!isMoveValid(numArgsRead, numArgsNeeded, board, numRows, numCols, *row,
  19. *col, blankSpace));
  20. }
Add Comment
Please, Sign In to add comment