input: Write a python function to check if the game is won in Tic-Tac-Toe.
  assert win_check('X') == False  # Initial state, no one should have won
  board = ['X', 'X', 'X', '-', '-', '-', '-', '-', '-']
  assert win_check('X') == True  # Top row win
  board = ['-', '-', '-', 'O', 'O', 'O', '-', '-', '-']
  assert win_check('O') == True  # Middle row win
  board = ['-', '-', '-', '-', '-', '-', 'X', 'X', 'X']
  assert win_check('X') == True  # Bottom row win
  board = ['X', '-', '-', 'X', '-', '-', 'X', '-', '-']
  assert win_check('X') == True  # Left column win
  board = ['-', 'O', '-', '-', 'O', '-', '-', 'O', '-']
  assert win_check('O') == True  # Middle column win
  board = ['-', '-', 'X', '-', '-', 'X', '-', '-', 'X']
  assert win_check('X') == True  # Right column win
  board = ['X', '-', '-', '-', 'X', '-', '-', '-', 'X']
  assert win_check('X') == True  # Diagonal win from top-left to bottom-right
  board = ['-', '-', 'O', '-', 'O', '-', 'O', '-', '-']
  assert win_check('O') == True  # Diagonal win from top-right to bottom-left
output: def win_check(player):
      win_conditions = [
          (0, 1, 2), (3, 4, 5), (6, 7, 8),  # Rows
          (0, 3, 6), (1, 4, 7), (2, 5, 8),  # Columns
          (0, 4, 8), (2, 4, 6)              # Diagonals
      ]
      for condition in win_conditions:
          if all(board[i] == player for i in condition):
              return True
      return False