So like I said above. I want to use getNeighbours(1,true,Black.class) to check if any of the neighbours are from White.class. The objects in my Scenario are contained in cells.


1 | boolean hasNeighbours = getNeighbours( 1 , true , Black. class ).size() > 0 ; |
1 | if ( ! getNeighbours( 1 , true , White. class ).isEmpty() ) |
1 | if ( ! getNeighbours( 1 , true , White. class ).isEmpty() ) |
1 | boolean hasNeighbours = getNeighbours( 1 , true , Black. class ).size() > 0 ; |
1 | int neighborCount = getNeighbours( 1 , true , White. class ).size(); |