def get_cart_location(env, screen_width):
    """
    Returns the position of the middle of the cart
    :param env:
    :param screen_width:
    :return:
    """
    world_width = env.x_threshold * 2
    scale = screen_width / world_width
    return int(env.state[0] * scale + screen_width / 2.0)