def winner(): for i in range(3): countO_row = 0 countx_row = 0 for j in range(3): if game_board[i][j] == 'O': countO_row += 1 elif game_board[i][j] == 'X': countx_row += 1 print(f"countO_row: {countO_row}") print(f"countx_row: {countx_row}") if countO_row >2: print("O is the winner") elif countx_row > 2: print("X is the winner") זה אמור לרוץ על כל המערך הדו מידי וכל טור אם הוא מוצא שלוש באותו טור שווים בסימן אז הוא אומר שx או o ניצחו אבל זה לא עובד