Ejemplo n.º 1
0
def test_get_obs_image_scale():
    agents = [Agent((1.1, 1))]
    pois = [POI((2.5, 1.2))]
    world = World(10, 10, 1, 1, agents, pois)

    img = world.get_obs_image(10)

    assert img[10][11][0] == 1
    assert img[12][25][1] == 1
Ejemplo n.º 2
0
def test_get_obs_image():
    agents = [Agent((1.1, 1))]
    pois = [POI((2.5, 1.2))]  # Even numbers round up, odd round down
    world = World(10, 10, 1, 1, agents, pois)

    img = world.get_obs_image()

    assert img[1][1][0] == 1
    assert img[1][2][1] == 1