Question: Write a C function that allows the user to find if any next move or next play for any player X or 0 who has
Write a C function that allows the user to find if any next move or next play for any player X or 0 who has the turn to play is winning move. The function will print the cell number or ID that if the player places an X or 0 in it he/she will win the game. If there is more than one cell where the player could place his symbol in and win the game the function should print all the winning cells for that player. The function prototype is void List Winning Cells(int m, int n, char board[][n])[30 points] 
0|X|0 4 5 I 6 7 | X | 9 I Cell # 5 is a winning cell for player X X 2 I 0| 5 X 6 I T 7|0|X T Cell # 5 and #6 and #2 are winning cells for player X 1 | 2 I 3 4 X I 0 I I 7 | 8 | 9 No winning cells for player X or O X 4 2 |0 X |0 7|8 9 Cell 9 is winning cell for Player O Cell 9 is winning cell for Player X
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
To solve this problem we need to evaluate potential moves on a tictactoe board and determine if any of these moves result in a win for the player whos... View full answer
Get step-by-step solutions from verified subject matter experts
