def aligned(source: tuple, target: tuple) -> bool:
    """True if positions are aligned orthogonally or diagonally."""
    row, col = source
    target_row, target_col = target
    if row == target_row or col == target_col:
        return True
    # test diagonals
    delta = row - target_row
    if (col + delta == target_col) or (col - delta == target_col):
        return True
    return False