Skip to content

GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects return (x, y) tuples #332

@noopynolife

Description

@noopynolife

Describe the bug
GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects in Matrx return (x, y) tuples.

To Reproduce
Perform a object_ids = Grid_world.grid[obj.location] call on an env_object obj where obj.location[0] != obj.location[1].

On inspection, object_ids will not include the env_object obj, because we effectively asked the grid_world to search (obj.location[1], obj.location[0]).

Expected behavior
It is expected that Grid_world.grid[obj.location] shows all object_ids that are registered at the location of the object.

Additional context
@thaije suggested I use search the State object instead, which I'll happily do, though that does not address the counterintuitive coordinate system of .grid

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions