I've got a question (and tell me if there is a better way to do this), I'm working on a for within a for to check the class of the tile for the list of tiles to see if any of then are not passable.
I have two lists, List<worldObject> atTile, and List<Class> nonpassableClasses.
When I compile it tells me "cannot find symbol - class ccls". Is there a way to check a list of classes for instanceof?
1 2 3 4 5 6 7 8 9 10 | for (worldObject cur : atTile) { for (Class ccls : nonpassableClasses) { if (cur instanceof ccls) { return false ; } } } |