grid entities - implement index method #73

Closed
opened 2025-03-03 17:40:40 +00:00 by john · 1 comment
Owner

grid.entities.remove(n) functions, but you need to know the index.

If I have an entity, and I want to remove it from the grid, I would like to use grid.entities.remove(grid.entities.index(e)).

I can't even iterate to check for equality, because of #72.

`grid.entities.remove(n)` functions, but you need to know the index. If I have an entity, and I want to remove it from the grid, I would like to use `grid.entities.remove(grid.entities.index(e))`. I can't even iterate to check for equality, because of #72.
john added the
Minor Feature
label 2025-03-03 17:40:40 +00:00
john closed this issue 2025-07-05 16:15:13 +00:00
Author
Owner

2025-08-06 - .remove(i) is described here as taking an integer index, but it's being refactored to take an object to remove from the collection instead. This matches the behavior of List.remove

2025-08-06 - `.remove(i)` is described here as taking an integer index, but it's being refactored to take an object to remove from the collection instead. This matches the behavior of `List.remove`
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: john/McRogueFace#73
No description provided.