You’re given two supporting functions as part of the starter code:
printBoard receives a 3x3 array representing a tic-tac-toe board, and displays it.printWinner receives a character representing the winner, and displays the winner.Your task is to write a function check_winner that takes a 3x3 char board and returns:
'X' if there are three cells in a line containing 'X' (row, column, or diagonal).'O' if there are three cells in a line containing 'O'.' ' (space) if there’s no winner yet.