I am getting an error when entering the code at the very end. please fix it.
9. Write function getMoveRow to do the following
a. Return type integer
b. Parameter list
i. 1-d character array (i.e. move), size 3
c. Convert the row portion of the player’s move to the associated
integer index for the board array
d. Example:
i. move = ‘b2’
ii. 2 is the row
iii. 2 is index 1 in the board array
e. Return the row array index that corresponds to the player’s move
f. Return a -1 if the row is not valid (i.e. INVALID)
10. Write function getMoveCol to do the following
a. Return type integer
b. Parameter list
i. 1-d character array (i.e. move), size 3
c. Convert the column portion of the player’s move to the associated
integer index for the board array
d. Example:
i. move = ‘b2’
ii. b is the column
iii. b is index 1 in the board array
e. Return the column array index that corresponds to the player’s
move
f. Return a -1 if the column is not valid (i.e. INVALID)
I am getting an error when entering the code at the very end. please fix it.
This is the code in C
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images