Question: Write a function named get_winer that determines who has won a game 10 points of tic-tac-toe. The function should first check all rows to

Write a function named "get_winer" that determines who has won a game 10 points of tic-tac-toe. The function should first check all rows to see whether one player occupies all the cells in one row, next check all columns, and then check the two diagonals. The function takes a two dimensional character array which represents the state of the game (filled with 'O' and 'X') and returns O or 1 or 2 ( O for draw, 1 for player one ('O') wins and 2 for player 2 (X') wins) 1 Add file
Step by Step Solution
3.40 Rating (169 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
