def transform_location(location):
    """Takes board coordinates (eg. d2, c4) and transforms into matrix coordinates (eg: (3, 1) or ."""
    c, r = location

    c = ord(c) - 97
    r = int(r) - 1

    return (r, c)