import random


def get_best_move(board, scores):
    """
    Find all empty squares with max score, then randomly returns one of them as (row, col) tuple
    """
    empty_list = board.get_empty_squares()
    best_score = float('-inf')
    best_move = []
    # check for max value in scores
    for item in empty_list:
        if scores[item[0]][item[1]] >= best_score:
            best_score = scores[item[0]][item[1]] 
    # add items with same best_score
    for item in empty_list:
        if scores[item[0]][item[1]] == best_score:
            best_move.append(item)
    return random.choice(best_move)