NxN tic tac toe with wincount given, if no of consecutive Os or Xs in a line equals "wincount" then the player wins. Write the win condition logic.
Asked in the pair programming stage.
Implement check_winner(board, win_count). board is an NxN list of lists containing "X", "O", or " ". Return the winning symbol, or None if neither player has a winning line. A run longer than win_count also qualifies because it contains a consecutive segment of that length. Check horizontal, vertical, and both diagonal directions.
def check_winner(board, win_count):