So I'm working on particle physics simulation using Java Processing where I now needs to keep track on what entities (objects with x and y coordinate) exists at certain parts of the screen. I'd also need to be able to know the cells' position to eachother as to do such as checking for collision between objects in a cell and bordering cells.
What's the best way to implement such a system? Is it somehow possible to put an ArrayList inside an array of arrays (2D-array)? Cause I didn't seem to manage to put lists inside arrays when I tried. Any better way to do it?
Aucun commentaire:
Enregistrer un commentaire