How should an ArrayList or similar structure be modified when elements regularly affect eachother every update of the container?
I am currently trying to create an entity based system for a game in Java with a handler class for updating and solving interaction between entities of different subclasses. They can damage each other as to remove oneanother and spawn in more entities with methods in their respective class while all still inheriting from the Entity superclass. Here is a summarized code as for my problem to demonstrate the issue: