UIGrid & UIEntity Integration; reliable add and remove #30
Labels
No Label
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
Refactoring & Cleanup
Tiny Feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: john/McRogueFace#30
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Notes say:
35 feat: UIEntities should have a .die() method that removes them from their grid; make UIEntity and UIGrid associations airtight (grid add/remove methods, entity add/remove methods, entity transfer to new grid method: Entity always in exactly 1 or 0 grid's collections, entity always has correct grid or None associated)
Grid.entities.append(Entity)should set the Entity's Grid pointer toself, and callremoveon the previous grid, if the entity has one.Grid.entities.remove(Entity)should work with an entity reference (see #29 for comparable behavior) and a) remove the Entity from the list, b) set the Entity's Grid pointer toNone, and c) raise an exception if the entity isn't in the collection.Entity.die()can basically work asself.grid.remove(self), raising an exception if the Entity doesn't already have a GridEntities can be disconnected from Grids, but they can't be on more than one.
This might be a prereq for #16